Find the answer to your Linux question:
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. ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    9

    Question 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.

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...