Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    user permissions


    hi all,

    sorry for dumb newbie question - my (Debian) root user can see all directories. I have created another user who can see some directories but then is is blocked from other directories by permission denied - how can I define which directories the user can see or just grant root / all permissions?

    Thank you

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    929
    First, root is not user, it is administrator. Second, users do not have much business outside of their ~/.
    If your user needs to access directories it cannot then you are not using your system properly.
    You better describe your problem in more detail.

  3. #3
    Quote Originally Posted by Segfault View Post
    First, root is not user, it is administrator. Second, users do not have much business outside of their ~/.
    If your user needs to access directories it cannot then you are not using your system properly.
    You better describe your problem in more detail.
    @ Segfault, thanks for your help.

    The path for my website files is
    /var/www/vhosts/example.com/httpdocs

    With my user account I can get as far as httpdocs but I can't open httpdocs (permission denied). So as user I can't do anything with my website files either in SSH or FTP.

    I can use SSH as root but I think this is bad practice. I can't use root in FTP because I think it is not allowed for security reasons.

    Thanks

  4. $spacer_open
    $spacer_close
  5. #4
    What group owns that directory? You may want to make a new group that has read and write access, then add your user to that group.

  6. #5
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    If you are using Apache for the web server, the owner:group for the /var/www directory is usually apache:apache. Some distributions use www-run. You didn't indicate which version of Linux you are using. You would then put your users in the apache group if that's what you use.

  7. #6
    Thanks for replies. I am using Debian 5 and Apache. I know how to add a user to a group but are there commands to say:
    list the current groups
    list users belonging to group x
    show the owner of directory y

    Thank you

  8. #7
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    You can use the less or more commands to get all groups: less /etc/group, more /etc/group or you can navigate to that file (/etc/group) to view them.
    Listing users with: groups apache (for example), show the owner of a directory: ls -l . To find the owner:group of directories in your /home/user just do: ls -l /home/user.

  9. #8
    Create a new group and give them, give that group access in sudoer file,
    by that you can set what that group can access and what not.

Posting Permissions

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