minor error with smb mount

Re: minor error with smb mount

Postby Jocko » Tue Dec 13, 2011 9:46 pm

So

You want copy files from your ubuntu to the NAS.

have you tried this :

Jocko wrote: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


Since the begining, I think the problem is that you mount the share without being the super-user and this user (ubuntu) has no permission to change them.
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.
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 » Fri Dec 30, 2011 10:09 am

Ok I mounted the share as super user and it still doesn't work. I get the permissions error no matter what. I have tried from several installations and it's a no go.

I tried mounting as super user with cifs gid=1001,uid=1001 as options (the user id in the NAS) and it just won't play ball.

The public directory on the NAS is chmod 777
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby firwareslut » Sat Dec 31, 2011 4:41 pm

I think the problem is definitely with the NAS. Have no issue with this using smb from ubuntu to ubuntu.
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby fvdw » Sun Jan 01, 2012 10:41 am

Hi firwareslut and happy new year

can you explain once more what you do
One which device do you make the mount (I assume on the nas) and how you copy, from the NAS to Ubuntu PC or the other way around, and so if the files copied have the permission not possible to set on then NAS or Ubuntu PC.

If it is mounting on the NAS and copying from Ubuntu to the NAS I can see no reason why the permission of the copied files (so those copied and now present on the NAS) could not be changed unless the mount is made with the wrong umask, but that sets in principle only read/write rights for accessing the files in the mountpoint.
I copied many files from my windows PC (ntfs partitions) using a mount and don't have this problem you describe.

PS to which directory do you copy the files to on the NAS and what are the permissions on that folder ?
When
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby firwareslut » Sun Jan 01, 2012 2:23 pm

I have no problem copying the files but if the application I use attempts to set permissions it won't work even though the file is copied.

I created a mapped folder and if I go the folder in terminal and try and do a chmod 777, for example, I get "Operation not permitted" error. If i try with superuser I get "Permission denied"

Now I have a very basic fstab entry

//192.168.0.150/public /media/NETWORKHD cifs username=xxxx,password=xxxx,auto 0 0

The permissions on the NAS are correct. Correct user and 777 file permissions on all directories inside /share/1000/public
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby fvdw » Sun Jan 01, 2012 5:20 pm

what do you mean with a "mapped folder"
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby firwareslut » Sun Jan 01, 2012 7:58 pm

exactly what the fstab entry says. /media/NETWORKHD is mapped using cifs protocol to //192.168.0.150/public (the share I made and gave access to in the webadmin for the NAS).
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby fvdw » Sun Jan 01, 2012 8:37 pm

so if I understand it correctly /media/NETWORKHD is the mountpoint on you ubuntu machine and your nas has ip 192.168.0.150 and you mounted the share public.
You copy files from your ubuntu machine to the public share en when the copy has finished your Ubuntu machine comes with an error message that it can't change permissions.
If so why does your Ubuntu machine tries to change the permission after copying ? (what the purpose of that ? copying is a write operation, apparently your ubuntu machine is trying to do more)

Anyhow in case the file copied does not have write permissions for the username Ubuntu is using it won't allow a change in permissions regardless if samba server has set read/write rights for all users (eq public).
As you use a linux machine I guess that owner and group settings of the the files you copied are copied as well. If only that owner has write permissions and that owner is not a know username on the nas then it will not allow you to chnage the permission on a file.
The solution could be change owner before copying the files to a username known on the nas. Or change permissions of the file before copying to give everyone write access.

To see if the above makes sense just look at owner and group name of the files after copying using ssh access to the nas (WinSCP or Putty)

that wna
Now you try to change permissions by using the samba server on the NAS using explorer
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby firwareslut » Mon Jan 02, 2012 6:39 am

The reason the permissions are changed is because I usually rsync my music over from my primary hard disc to the NAS. If I don't use archive mode it seems to recopy data that's already there.

The problem was alerted to me when I switched to KDE and copied files in dolphin and this error happened every time. But I have sinced moved back to Unity and Nautilus doesn't try to set permissions so it's not a big a problem as it used to be.

My ubuntu user and the user on the NAS are the same. I even edited /etc/passwd on the NAS to same user ID as on Ubuntu (1001). It still doesn't work.

It I create a file in the share and do ls-oah on the NAS in shell then the user name is displayed.

If I cd /media/NETWORKHD and ls -oah on the Ubuntu machine the username is displayed as 1001 (the user ID in the NAS /etc/passwd).

I tried updating and remounting with this line

//192.168.0.150/public /media/NETWORKHD cifs username=adam,password=xxxx,uid=1001,gid=1001,umask=0000 0 0

and also tried

//192.168.0.150/public /media/NETWORKHD cifs username=adam,password=xxxx,uid=adam,gid=adam,umask=0000 0 0

And still no go.
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby fvdw » Mon Jan 02, 2012 11:06 am

I did some trials, to be able to change permission of files in the public share (or any other) via samba server the user trying to change the permissions must be the same as the owner of the file.

So check after copying who is the owner of the copied files, if that differs from the user doing the copy then the reason is found why that user can not change the permissions
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

PreviousNext

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 4 guests