Results 1 to 2 of 2
All,
I am trying to install software in the software directory which by default belongs to the user:group root:root.
Lets I create a user called user1 belonging to group group1.
...
- 03-07-2011 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 9
Installing software in /opt
All,
I am trying to install software in the software directory which by default belongs to the user:group root:root.
Lets I create a user called user1 belonging to group group1.
And I create a directory called install1 under /opt
So from /opt, I do:
chown -R user1:user1 install1
Now install1 directory belongs to user user1 and group1.
Question is that in the full path /opt/install1, the parent directory belongs to root:root whereas the child directory (install1) belongs to user1:user1. Now when I install software as user1 and give that Path to install as /opt/user1/blah1 , is that ok?
Just wondering because /opt is root:root
Thanks in advance.
- 03-08-2011 #2
First of all, just to let you know, /opt isn't really the preferred place to install software anymore. We generally prefer to install to the standard directories under /usr/local.
In any case, this is a common permissions question. I assume that you know the difference between owners, groups, and others when it comes to permissions. Files and directories can have read, write, and execute permissions. For files, the meanings of these are pretty obvious. For directories, it's a bit more complicated:
read - Can see the contents of the directory
write - Can create and remove items in the directory
execute - Can enter the directory
So in your case, as long as the user has execute permissions on /opt, they will be able to access /opt/install1. The user will probably also want read permissions on /opt, which allows them to run ls and see what directories exist.
This problem is analagous to /home and /home/user, where the user has complete control over their own home directory, but root owns /home.DISTRO=Arch
Registered Linux User #388732


Reply With Quote