Find the answer to your Linux question:
Results 1 to 4 of 4
Hello everyone, I was wondering how I can get specific users to access specific folders. I want one of my users to be able to access the apache htdocs folder, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Location
    Kokomo, IN
    Posts
    58

    Folder permissions


    Hello everyone,
    I was wondering how I can get specific users to access specific folders. I want one of my users to be able to access the apache htdocs folder, and his home folder. The thing is I don't want the user to be able to access anything but those folders. I don't want the user to be able to add anything inside the home folder, I just want him to able to read, write, and execute in his own folder. I've been messing around with the permissions, and the users and groups wizard in gnome, but I can't seem to get exactly what I want. Are there any config files I need to look at?

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    It's entirely a group issue.

    Let's do this:

    Let's say that the user is userA. We will need two groups:

    userA
    webStuff

    userA should be a member of userA and webStuff, and NOTHING else (this includes "users").

    /home/userA should have permissions of rwx------. He can read/write/execute, but no one else can. Owner should be userA, controlling group should be userA.

    The htdocs folder should have controlling group as webStuff. The permissions should be rwxrwx---.

    Basically, as long as he isn't part of "users", he shouldn't be able to access quite a bit of stuff.

  3. #3
    Just Joined!
    Join Date
    May 2005
    Location
    Kokomo, IN
    Posts
    58
    Worked like a charm, thanks!

    Now that I've figured this out. Is there a gnome app that will allow me to change a folders permissions and all sub folders at the same time?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    I dunno about a Gnome app, but the
    Code:
    chmod -R ...
    command will apply the changes to the folder and all its contents / subfolders. "-R" stands for recursive, and many commands have it as a flag.

Posting Permissions

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