Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
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:
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.
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??
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".
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe