ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.27k stars 628 forks source link

Centos8 permission #3009

Closed TempleNode closed 3 years ago

TempleNode commented 3 years ago

The permission on centos 8 on

/usr/local/antmedia/.javacpp /usr/local/antmedia/work /tmp/vertx-cache

are pieces of crap. Where is the x flag on those? I can't believe you put that software as the final release when is a piece of shit? Do you even test it before you release it?

mekya commented 3 years ago

hi @TempleNode ,

Thank you for the feedback. I don't understand the problem you mention. Sorry it's my lack of information. We can make it better with your support/feedbacks.

Could you explain further?

I am not sure if it's related to official Centos support. Because CI test the software with Ubuntu 18.04. There is no official support for Centos.

TempleNode commented 3 years ago

On those directory /usr/local/antmedia/.javacpp /usr/local/antmedia/work /tmp/vertx-cache

there is no execute (x) flag and when you run the program it said you do not have permission.

mekya commented 3 years ago

As far as I know there should be no (x) flag for these folders.

Anyway, let us check. Thank you so much for the feedback.

TempleNode commented 3 years ago

and how you write files if there is no x flag?

mekya commented 3 years ago

Maybe I'm missing something but no need to have x(executable) permission when you write the files. Write permission is enough as far as I know. Maybe I'm having some misunderstanding.

My colleague @muratugureminoglu has more experience in linux, Centos. He'll give you an answer.

muratugureminoglu commented 3 years ago

@TempleNode There is a x flag by default in the directories that I have checked. Can you share the exact error that you received with us? Maybe you have installed with an unauthorized user before.

TempleNode commented 3 years ago

The install script found here seem to be wrong.

  1. They set permission umask 133 which is rw-r-r
  2. Also the code is bad when setting centos service file The lines if [ "$ID" == "centos" ]; then sed -i 's/-umask 133/-umask 91/g' $SERVICE_FILE fi should be set after $SUDO cp $AMS_BASE/antmedia.service /lib/systemd/system/ if [ "$OTHER_DISTRO" == "true" ]; then sed -i "s#=JAVA_HOME.*#=JAVA_HOME=$CUSTOM_JVM#g" $SERVICE_FILE fi Also also umask should be set as 022 -- rwx-rx-rx or the octal with 18
muratugureminoglu commented 3 years ago

Thanks for the info.

I think 644 is sufficient for our application. Since jsvc will be removed in the future, these parts will be deleted. Thanks for your comment.

Regards.

mekya commented 3 years ago

Shall we provide a quick workaround for this issue @muratugureminoglu?

Because we don't know how much we need to work in removing the jsvc.

muratugureminoglu commented 3 years ago

This issue has been fixed.

https://github.com/ant-media/Scripts/blob/master/install_ant-media-server.sh#L276

Regards.