minor error with smb mount

minor error with smb mount

Postby firwareslut » Mon Dec 05, 2011 7:11 am

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?
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby Jocko » Mon Dec 05, 2011 9:40 am

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)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: minor error with smb mount

Postby firwareslut » Mon Dec 05, 2011 11:20 am

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).
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby Jocko » Mon Dec 05, 2011 1:27 pm

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"
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: minor error with smb mount

Postby firwareslut » Mon Dec 05, 2011 2:11 pm

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.
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby firwareslut » Mon Dec 05, 2011 2:18 pm

//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
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby Jocko » Mon Dec 05, 2011 5:41 pm

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.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: minor error with smb mount

Postby fvdw » Tue Dec 06, 2011 9:24 pm

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.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby firwareslut » Tue Dec 13, 2011 7:19 am

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.
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby fvdw » Tue Dec 13, 2011 7:39 pm

Sorry but I don't know firewareslut
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Next

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 2 guests