Find the answer to your Linux question:
Results 1 to 3 of 3
I've got a Windows Server 2003 R2 machine with a share. A user, let's call it "mang", is added in Windows' Computer Management, and the user is given Full Access ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    18

    Samba / CIFS mount point won't allow read/write for non-root user


    I've got a Windows Server 2003 R2 machine with a share. A user, let's call it "mang", is added in Windows' Computer Management, and the user is given Full Access to the share.

    In Linux (using Red Hat Enterprise Server 5), in /etc/fstab I have the following:

    //mangwin1/mang /mnt/mangwin1 cifs username=mang,password=mypass

    Note that smbfs is not available in RHES5, only cifs -- that is, that's what I understood after an hour or two of research getting this thing initially set up and running, but I'm open for correction of course.

    As root, I am able to navigate to /mnt/mangwin1 and it sees my share fine. I can add files, create directories, the whole nine yards. If I "su mang", though, at first it seems like I can do anything but then suddenly after the first write (or it seems that's when it happens, can't put my finger on the timing) suddenly everything becomes owned by root and read-only to me as 'mang'. If I had created a file called "foo", I cannot "touch foo" (Permission Denied). If I reboot, I can touch it, modify it, but if I create a foo2, the whole thing locks up again.

    As root I tried running "chown mang /mnt/mangwin1 -R" which worked at first up until the "mang" user wrote to the file.

    I also tried (in fstab):

    //mangwin1/mang /mnt/mangwin1 cifs username=mang,password=mypass,file_mode=0777,dir_m ode=0777 0 0

    No change.

    I suspected perhaps it was SELinux. Setting that to "Disabled" as default and rebooting resulted in no change.

    Help!! I'm still quite new to Linux and don't know what to guess anymore!

    Thanks,
    Jon

  2. #2
    Just Joined!
    Join Date
    Jul 2007
    Posts
    18
    Getting this up and running is pretty critical to us right now. I realize that this is Labor Day weekend, but if anyone can at least point me to another forum or even a reliable paid consulting service (perhaps we should call up Red Hat since we bought their RHES 5 license) so that this can be resolved early this week it would be nice.

    Windows Server 2003 R2 does have NFS support. Is it feature-complete enough to meet our needs (given the scenario of publishing a couple gigs of small files each night from Linux to Windows) such that you guys recommend using it??

  3. #3
    Just Joined!
    Join Date
    Jul 2007
    Posts
    18
    We *think* we may have finally figured this one out. When declaring the parameters of the mount (i.e. in /etc/fstab), in addition to the username and password you also need to set the uid=xxx or the gid=xxx, where uid is a User ID and gid is a Group ID.

    In our case, we added uid=505:

    mount -t cifs -o user=mang,pass=12345,uid=505 //mangwin1/mang /mnt/mangwin1

    However, file_mode and dir_mode seem to have not functioned as they should have, so we took them out. Might also be picky about using "user" and "pass" rather than "username" and "password".

Posting Permissions

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