Linux / opt / * folder and permissions

I use the /opt/ folder to install common software that would not otherwise be available as part of the package installer on the system and should be accessible to many (developers) users on Linux (using Ubuntu at the moment):

 /opt/dev/eigen/3.1.3 /opt/dev/boost/1.54 /opt/git/myproject1.git /opt/git/myproject2.git 

Would incorporating common software be common practice? what about permissions? I am prone to chmod -R 777 /opt/dev , but this is a very bad practice, I think. Suggestions for best practices in this area? maybe something like adding a development team and giving them all the permissions or?

Note git is a special case, but all developers need access to it, because pushing changes involves creating a directory and files along this path with the developer credentials.

+6
source share
1 answer

According to these sites:

https://bbs.archlinux.org/viewtopic.php?id=35867 https://askubuntu.com/questions/169314/default-permissions-for-opt-directory

plus my experience, the correct permission to use is 755 for subdirectories in / opt. If your user is in the root group, you can also set permissions to 775. You should be fine with this if there is nothing significant in the / opt folder. If so, you might consider storing in a separate subdirectory of / opt with even more limited permissions.

+5
source

Source: https://habr.com/ru/post/949043/


All Articles