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.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Servers
Reload this Page Samba / CIFS mount point won't allow read/write for non-root user
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Servers Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Reply
 
Thread Tools Display Modes
Old 09-02-2007   #1 (permalink)
stimpy77
Just Joined!
 
Join Date: Jul 2007
Posts: 17
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
stimpy77 is offline   Reply With Quote
Old 09-03-2007   #2 (permalink)
stimpy77
Just Joined!
 
Join Date: Jul 2007
Posts: 17
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??
stimpy77 is offline   Reply With Quote
Old 09-04-2007   #3 (permalink)
stimpy77
Just Joined!
 
Join Date: Jul 2007
Posts: 17
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".
stimpy77 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Icon creation sheds Linux Applications 23 03-10-2005 03:11 PM
Linux - Who uses 485388K memory ? Rod Redhat / Fedora Linux Help 5 02-28-2005 09:16 PM
Squid does not start AlexPal Servers 1 02-09-2005 02:39 AM
Two X servers bjacokes Linux Desktop / X-Windows 1 01-28-2005 06:39 AM




All times are GMT. The time now is 07:51 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0