Find the answer to your Linux question:
Results 1 to 7 of 7
I have an ubuntu server running samba. I have joined to an Active Directory domain and can log in using windows username/passwords. I created a group and gave them ownership ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    6

    Why do I have to run chmod 777


    I have an ubuntu server running samba. I have joined to an Active Directory domain and can log in using windows username/passwords. I created a group and gave them ownership to all files in a shared folder (via samba) the files have the equivalent of permissions 770. I have added my windows' username to the group. So far everything is cool. I can read and write to the folder. But ... I can not overwrite files.

    I changed the other group to have write permissions on one of the files to test it (using the command chmod 777) and suddenly I have the ability to overwrite the file.

    I don't understand why the other group needs to have write permissions. Shouldn't my user have the ability to overwrite based on being a member of the owning group?

    Thanks for the help!
    Trevor

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,184
    Quote Originally Posted by dumbLuck View Post
    I changed the other group to have write permissions on one of the files to test it (using the command chmod 777) and suddenly I have the ability to overwrite the file.

    I don't understand why the other group needs to have write permissions. Shouldn't my user have the ability to overwrite based on being a member of the owning group?
    Yes, it should. This looks to me as if you have not successfully added yourself to the group. You think you have but the system sees you as one of the others. Have you checked in /etc/group to see if you are really in there?
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Just Joined!
    Join Date
    Jun 2009
    Posts
    6
    Quote Originally Posted by hazel View Post
    Yes, it should. This looks to me as if you have not successfully added yourself to the group. You think you have but the system sees you as one of the others. Have you checked in /etc/group to see if you are really in there?
    Thanks for the reply!

    I have checked and I am listed in there. Here is what it shows:

    Code:
    webwork:x:1001:DOMAIN+user

  4. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    maybe thats the problem. if when logged in as a domain user, from a command prompt type
    Code:
    whoami
    does it say DOMAIN+username, or does it just say username?

    when I add AD users to a linux group (like sudo) I usually just use the username and not domain+username. but I only log in with a username and my domain is set as the default domain so I don't have to enter that.

  5. #5
    Just Joined!
    Join Date
    Jun 2009
    Posts
    6
    Thanks for the reply!

    When I log in and run whoami, it shows just the username. I have tried adding just the username to the appropriate group using:
    Code:
    useradd -G webwork myusername
    and I get an error saying "useradd: user myusername exists"

    I then manually edited the group file and added myusername to the group. But I still cannot overwrite any files unless I give the other group write permissions.

  6. #6
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    have you checked the permissions of the file in question?
    Code:
    ls -l
    probably should say

    Code:
    webwork webwork
    as the owner and group

  7. #7
    Just Joined!
    Join Date
    Jun 2009
    Posts
    6
    Thanks for the reply. Running ls -l I see the owner as a user and the owning group as webwork.

    Thanks,
    Trevor

Posting Permissions

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