alow regular user access without comprimizeing security of permissions
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: alow regular user access without comprimizeing security of permissions

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    282

    alow regular user access without comprimizeing security of permissions

    Without comprimizeing the security I want a user to have write access to the content folder for apache. However I cannot achive this, and need assistance. I want my user account to have write permisions to /var/www/html

    I decided to create a webaster group, make the user a member of the new group then change ownership of /var/www/html:
    Code:
    /usr/sbin/groupadd webmaster
    gedit /etc/group
    # webmaster:x:502:root,atapi103
    chown -R :webmaster html
    chmod -R 775 html
    However I am unable to write to that folder.

    atapi103 [/var/www]$ ls -l
    total 20
    drwxr-xr-x 2 root root 4096 Nov 19 08:40 cgi-bin
    drwxr-xr-x 3 root root 4096 Apr 3 04:32 error
    drwxrwxr-x 3 root webmaster 4096 Nov 19 08:40 html
    drwxr-xr-x 3 root root 4096 Apr 3 04:33 icons
    drwxr-xr-x 14 root root 4096 Apr 3 04:39 manual

    atapi103 [/var/www/html]$ gedit index.htm
    Cannot create the file "/var/www/html/index.htm".
    Make sure you have the appropriate write permissions.
    atapi103 should have write access to html correct? How can I alow atapi103 to have write access, without comprimizeing the security as to allow other unauthorized users access?

  2. #2
    A short list of checks to make first:

    pre: make sure to do this as su root

    1. make sure you are in /var/www/
    2. chgrp -R webmaster html
    3. chmod -R 775 html
    4. double check your /etc/group file that the proper name (spelling included) is correctly placed in the group. I know you did this, but run a double check for spacing errors or typos.

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Posts
    282
    Ok I did everything as you said, I also double checked /etc/group and made sure there were no spaces or formating errors.

    I noticed after the line webmaster:x:502:root,atapi103 there was a blank line following, so I placed the cursor to the end and hit delete to make sure webmaster:x:502:root,atapi103 was the very last line, but that made no difernce

  4. #4
    Are you stuck in Commandline, or do you have a DM present (such as kde or gnome)

  5. #5
    Senior Member
    Join Date
    Feb 2003
    Posts
    282
    I have gnome, I am using the terminal provided.

  6. #6
    Can you do me a favor? Copy and paste a section of your /etc/group?


    I want to make sure the layout for your groups are identical. I understand you used the groupadd command, but better safe than sorry. Not all of it, just a few normal lines like the sys group and wheel group.

  7. #7
    Senior Member
    Join Date
    Feb 2003
    Posts
    282
    Ok here is my /etc/group will all the fat cut out, I attached is the full also

    root:x:0:root
    bin:x:1:root,bin,daemon
    daemon:x:2:root,bin,daemon
    sys:x:3:root,bin,adm
    adm:x:4:root,adm,daemon
    nobody:x:99:
    users:x:100:
    desktop:x:80:
    gdm:x:42:
    atapi103:x:500:atapi103
    sunnyday:x:501:
    wine:x:66:
    webmaster:x:502:root,atapi103

  8. #8
    Everything checks out, permissions, group settings, etc etc.

    Have you thought of a compelte reboot? Sometimes there are odd settings in httpd servers and other services in which they have to be literally restarted (along with the user) to reset the permissions level.

    Beyond doing that, everything should be working, as it is a textbook permissions change in which you preformed perfectly.

  9. #9
    Senior Member
    Join Date
    Feb 2003
    Posts
    282
    Ok I did the reboot and that solved it No more error

    I deeply thank you, I was getting fusterated. Much apreciation.

  10. #10
    Glad I could help

    (and people say linux never needs to be restarted ppfft)

Posting Permissions

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