Page 1 of 5
minor error with smb mount

Posted:
Mon Dec 05, 2011 7:11 am
by firwareslut
I am using the following mount option in fstab to mount my smb share
//192.168.0.150/public /media/NETWORKHD smbfs username=xx,password=xx,allow_other,noauto,users 0 0
It works pretty much perfectly except any file copying operation from my Ubuntu install returns with "ERROR: Cannot change permissions" when the file has finished transferring.
Is there something missing from my fstab command or is it a setting in smb.conf?
Re: minor error with smb mount

Posted:
Mon Dec 05, 2011 9:40 am
by Jocko
Hi firwareslut,
Try to use the option "cifs" instead of "smbfs" which is a deprecated option. You could also try to add the option "nosetuids" with "cifs".
For keep the right encoding, I advise you to add the option "utf8" and add also option "sync" (async is the default set)
Re: minor error with smb mount

Posted:
Mon Dec 05, 2011 11:20 am
by firwareslut
I tried this
//192.168.0.150/public /media/NETWORKHD cifs username=xx,password=xx,allow_other,noauto,users,umask=000,nosetuids,utf8,sync 0 0
But still the same problem (files copy fine but then cannot set permissions error).
Re: minor error with smb mount

Posted:
Mon Dec 05, 2011 1:27 pm
by Jocko
Very strange...
I assume your user "xx" has write permission in the share "public".
So try again but without the option "nosetuids" and use the options "uid","gid" and "nosetuids".
First try :
uid=0 and gid=0 (that is the default options)
second try :
uid=xx and gid=xx (or numeric uid in accordance with the value into the file "/etc/passwd" of your NAS for the user "xx")
Last question, what is the uid which mount the share ? what it happens if you don't use the options "allow_other and users"
Re: minor error with smb mount

Posted:
Mon Dec 05, 2011 2:11 pm
by firwareslut
Still no go, tried setting uid and gid to the user in the NAS (1001) and also tried with and without nosetuids. Same problem.
The Allow_other and users makes no difference if i try with or without. Those options allow me to mount the drive without being a super user.
Re: minor error with smb mount

Posted:
Mon Dec 05, 2011 2:18 pm
by firwareslut
//192.168.0.150/public /media/NETWORKHD cifs username=xx,password=xx,allow_other,users,noauto,uid=1001,gid=1001,iocharset=utf8,syn,rw,dir_mode=0700,file_mode=0700 0 0
tried the above as well but still same problem
Re: minor error with smb mount

Posted:
Mon Dec 05, 2011 5:41 pm
by Jocko
Ok
One more test to detect if it's your Ubuntu OS or the NAS configuration which is cause the issue.
Open a terminal window as
super user (or use "sudo") and try to mount manualy the share and use only the required options :
- Code: Select all
mount -t cifs //192.168.0.150/public /media/NETWORKHD -o rw,username=xx,password=xx
Note :Options 'dir_mode' and 'file_mode' are useless with the NAS.
Re: minor error with smb mount

Posted:
Tue Dec 06, 2011 9:24 pm
by fvdw
firwareslut wrote:I am using the following mount option in fstab to mount my smb share
//192.168.0.150/public /media/NETWORKHD smbfs username=xx,password=xx,allow_other,noauto,users 0 0
It works pretty much perfectly except any file copying operation from my Ubuntu install returns with "ERROR: Cannot change permissions" when the file has finished transferring.
Is there something missing from my fstab command or is it a setting in smb.conf?
I assume you mean you copy files from your nwsp2 to the Ubuntu machine and then you can not change the permissions
The reason could be that the username and uid that you used on your ubuntu machine is different from the one used when the file was stored on the nwsp. if those are different and the write flag is not set for others then you can not change permission on the Ubuntu machine.
Suggest to have a look at properties of the copied file when having it copied to the Ubutu machine and check owner/group settings. If thats different from user under which you run Ubuntu and the write flag is not set for others then it is clear why it can't not change permissions. Then you need superuser (root) to change it or be member of the sudoers.
ps mounting options have no influence on the file properties you copy, those are only used for authentication and gain access to the sever.
Re: minor error with smb mount

Posted:
Tue Dec 13, 2011 7:19 am
by firwareslut
Sorry for not getting back quickly on this. I am still testing things. Does the fact I am copying from an NTFS partition affect this? Just realised that is the filesystem on the drive.
Re: minor error with smb mount

Posted:
Tue Dec 13, 2011 7:39 pm
by fvdw
Sorry but I don't know firewareslut