I'm using the folder /opt/
to install common software that would otherwise not be available as part of the package installer of the system and that should be available to many (developer) users in 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
Putting the common software there would be the common practice right? how about permissions? I tend to chmod -R 777 /opt/dev
but this is a very bad practice I guess. Suggestions on best practices in this area? probably something along the lines of adding a developers group and giving them all permissions or?
Note git is a special case but still all developers need access to it because pushing changes implies creating directory and files under that path with the developer credentials.
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, a correct permission to use is 755 for subdirectories in /opt. If your useris part of the root group, you could also set permissions to 775. You should be fine with this as long as there's nothing considerably sensitive in your /opt folder. If there is, then you might consider storing those in a separate subdirectory from /opt with even more limited permissions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With