readthefuckingmanual.net

[SOLVED] mount error 1 = Operation not permitted

Error added: 2008-04-17T09:26:47Z

0 people waiting for the answer...

1 answers found.

Answer 1014 (57.142857% helpful)

Here is one solution.

The problem : mount calls mount.cifs but your user cannot user it. It can also be a problem of credentials so prefer the use of the credentials option in your fstab, better than the inline setting of user and password.

The solution : 

1- set the sticky to mount.cifs bin 
You must set the sticky bit on the /sbin/mount.cifs and /sbin/umount.cifs

locate your bins with : \"which mount.cifs\" or updatedb; locate mount.cifs.

command : sudo chmod +s /sbin/mount.cifs
command : sudo chmod +s /sbin/umount.cifs

2 - the credentials :

in your /etc/fstab 

//<server>/<share> <local_mount_name> cifs credentials=/<path_to>/cifs_credentials.creds,noauto,users,nosuid,noexec 0 0

NOTE : to auto mount at startup, remove \"noauto\" and add \"_netdev\" option.

a -Create the file /<path_to>/cifs_credentials.creds :
command : touch /<path_to>/cifs_credentials.creds

b- fill the file : 
add only those two lines : 
username=<share_user>
password=<share_password>


Thos should make you able to mount a cifs with any user just by typing :
command : mount <local_mount_name>

NOTE : the sticky is not the best way to do it but certainly the most simple (and most effective on most linux-like systems).

I hope this helps,

best regards,
Nicolas Verriest.
Permalink

Add an answer/solution

If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people struggling with this too.


Please enter 61948 here

If you want to be notified via email when this is solved, enter your email address here: