minor error with smb mount

Re: minor error with smb mount

Postby firwareslut » Mon Jan 02, 2012 11:50 am

The owner of the files is the same. Same name and same id.


adam@main:/media/NETWORKHD$ touch ok
ls -oah
drwxrwxrwx 4 adam 0 2011-12-29 14:32 01.VIDEO
drwxrwxrwx 6 adam 0 2011-12-31 01:46 02.MUSIC
-rw-rw-rw- 1 adam 0 2012-01-02 12:50 ok
adam@main:/media/NETWORKHD$ chmod 755 ok
chmod: changing permissions of `ok': Permission denied

adam@main:/media/NETWORKHD$ sudo chmod 777 ok
chmod: changing permissions of `ok': Permission denied
adam@main:/media/NETWORKHD$
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 12:55 pm

I simulated it on my spd8020 mounting the public share from the nwsp2
and indeed you cannot change the permissions from the machine that did the mount, even not after changing owner (1000 matches with the username used to mount the share)

(/share/1000/192.168.1.197-smb-public is the mountpoint on the spd8020 of the nwsp2 public share)

Code: Select all
root@SPD8020:/share/1000/192.168.1.197-smb-public # ls -oal test.tar
-rw-r--r--  1 root 541184 Nov 14 21:09 test.tar

root@SPD8020:/share/1000/192.168.1.197-smb-public # chmod 666 test.tar
chmod: changing permissions of `test.tar': Permission denied

root@SPD8020:/share/1000/192.168.1.197-smb-public #
root@SPD8020:/share/1000/192.168.1.197-smb-public # ls -oal test.tar
-rw-r--r--  1 1000 541184 Nov 14 21:09 test.tar

root@SPD8020:/share/1000/192.168.1.197-smb-public # chmod 666 test.tar
chmod: changing permissions of `test.tar': Permission denied


so now I can simulate your problem i can have a closer look, must be something with samba settings
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 1:03 pm

Ok thanks! Appreciate it!
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 3:07 pm

when accessing the same share via windows explorer then I can change in explorer the file permissions when the username as used to login to windows fits with owner of the file. Explorer uses the samba server.
That means that it must be a mounting parameter
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 3:26 pm

hehe yeah but what? I cannot make it work at all.
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby Jocko » Mon Jan 02, 2012 4:33 pm

Indeed it seems there be a problem with the samba server settings. Little additional test, I mounted a public share with the login "root" server and I get the same message.

The fact that the user "root" is the only one to be defined with a valid shell, is not the problem. So something to look on the server side.
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 » Mon Jan 02, 2012 4:41 pm

On the other hand there is something contradicting this , that is when using the same samba server you can change permission of a file using windows explorer in case the owner of the file and the windows username is the same.
The share public is just a samba share mounted by windows. Just try it. If you can then change permissions of a file in a samba share via explorer then it means the server settings allow it, so it must be the way the share is mounted by the client
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 5:55 pm

I enabled a shared samba folder on my media pc with the same login named and mounted the drive on the client pc in the same way as I mounted the NAS. I can change file permissions on the media PC no problem at all. It has to be a configuration issue on the NAS.

Are the perms actually being modified by explorer if you check directly on 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 » Mon Jan 02, 2012 6:36 pm

I change the permissions with explorer and verified it on the NAS via ssh access

below a screen shot from windows7 when making the change.
PS again it only succeeds if the username of windows7 matches with the owner of the file as sored on the NAS
I checked if the permissions are really changed on the NAS and that is the case

on windows 7 explorer before making the change
explorer-W7.JPG


then remove write access permission and save

On the Nas you see now this
linux-after.JPG
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby Jocko » Mon Jan 02, 2012 6:44 pm

With XP you can't do that (and I don't know about vista)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

PreviousNext

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 8 guests