Mounting Samba share with fstab
Hi all,
I'm trying to set up a Buffalo Pro Duo NAS drive to be user mountable via an fstab entry. I can mount and use it perfectly with: Code:
mount -t cifs -o guest //192.168.0.194/krayNetDrive /X: Code:
icarus@daedalus:~$ mount /X:/ Code:
//192.168.0.194/krayNetDrive /X: cifs guest,noauto,user,umask=000 0 0 If I put in the username = icarus I get a password prompt that gives the same behavior. I've tried removing the umask option thinking that maybe I can't set a umask for a samba share, but that doesn't change my results. Can anyone tell me where I'm going wrong? As an aside, is there any way to suppress the error messages about not being able to maintain file permissions when I copy stuff onto the NAS? It's not that annoying when using command line tools, but when I'm melding a file tree onto the NAS and Meld gives me a prompt for every single file it's incredibly frustrating. I can't find an option in meld for this, will any of the share options do this? Thanks in advance. |
try doing it as root
|
When I try it as root it works perfectly. Does that tell you anything?
The users option in the fstab allows me to try to mount it as a user, but apparently cifs is not getting the right options. I can't find anything in the specified man page that sheds any light on the subject. I've tried a bunch of the options, sec=none, guest, user=guest, etc. with no effect. Anyone have any more suggestions? |
Give this a shot
Code:
//192.168.0.194/krayNetDrive /X: cifs noauto,username=icarus 0 0 |
That won't allow me to mount it except as root. If I add the users option I get the same error with either icarus or guest as the username, operation not permitted.
|
Sorry for the delayed response, been busy the past few days. Anyway,this sounds like a permissions issue to me. You may want to do an ls -l on /sbin/mount.cifs and find out what group/permissions are set on the mount command. Chances are, this is set to root/root. You could setup a samba group and add yourself, and anyone else you need, to the samba group. Then change /sbin/mount.cifs to root/samba with permissions of 750 or something similar. Then anyone that's part of the samba group should be able to execute that command.
|
I checked the file permissions all the way down the tree. mount.cifs, and the link to it which is used in the path, have permissions 755 or higher. All the directories in the paths leading to the link and the actual binary are set with permissions 755.
As far as I can tell all the permissions should allow normal users to use mount.cifs. Also, I'm not sure if this matters or not, but I set the permissions of the mount point itself to allow all users rwx access. Thanks for the suggestion, does anything else come to mind? |
Honestly, I'm out of ideas here. At this point all I can suggest is to double check everything: smb.conf on the remote machine, samba user accounts on the remote machine, fstab on the local machine, mount point on the local machine. If root is able to mount this successfully and users can not, it just seems like a permissions issue to me...
|
I don't think it's a permissions issue at the OS level because the error doesn't seem to be coming from the OS. It seems that I have permission to executre mount.cifs, but when I do the application itself is saying I'm not permitted to do something. I guess I need to do more digging into what mount.cifs actually needs.
|
All times are GMT -5. The time now is 09:57 AM. |