minor error with smb mount

Re: minor error with smb mount

Postby firwareslut » Wed Jan 04, 2012 12:20 pm

Sorry i mean NAS not NFS!!
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby fvdw » Wed Jan 04, 2012 12:53 pm

bingo , or at least progress :mrgreen:

I used this as mount command
Code: Select all
 mount -t cifs //192.168.1.197/public public -o user=fvdw,pass=abcd,nounix


this gives as mount
Code: Select all
//192.168.1.197/public on /rw_fs/tmp/mnt/public type cifs (rw,mand,relatime,unc=\192.168.1.197\public,username=fvdw,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.197,
file_mode=0755,dir_mode=0755,serverino,rsize=16384,wsize=57344)


now I can change the write flag of files of which fvdw is the owner using Linux running on the NAS, just like when using windows explorer

I can also change any other permission without getting an error message or not permitted mesaage but no changes are made on the real file
Also write permissions of files you do not own you can change, and on the mounted files system it looks that they are changed by in reality it is not.

This is exactly the way windows is behaving.

Think this could be a solution to your problem as if the program wants to change permission the server will not respond with an error message or permission denied. :mrgreen:
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby fvdw » Wed Jan 04, 2012 1:01 pm

Also here some more info, seems this permissions issue is a general samba limitation
http://www.faqs.org/docs/samba/ch05.html

copy from a part of that page
For the most part, the files and directories contained in the mounted smbfs filesystem will work just like any others, except for limitations imposed by the nature of SMB networking. For example, not even the superuser can perform the operation:

# chown root lectures
chown: changing ownership of 'lectures': Operation not permitted

because SMB shares do not intrinsically support the idea of ownership. Some odd behaviors can result from this. For example, the command:

# chmod 777 readme.txt

does not produce an error message, although nothing has been changed. The file readme.txt still has permissions set to 664:

# ls -l readme.txt
-rw-rw-r-- 1 jay jay 131 Jan 15 05:01 readme.txt
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby firwareslut » Wed Jan 04, 2012 1:22 pm

If i mount with a nounix flag in fstab I receive no error but when i do ls /media/NETWORKHD I get "no such file or directory"

I tried a manual mount but the same problem

adam@main:/media$ sudo mount -t cifs //192.168.0.150/public /media/NETWORKHD -o user=adam,pass=xxxx,nounix
adam@main:/media$ ls NETWORKHD
ls: cannot access NETWORKHD: No such file or directory
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby fvdw » Wed Jan 04, 2012 1:30 pm

what does the mount look like (type mount)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: minor error with smb mount

Postby firwareslut » Sat Jan 07, 2012 3:27 pm

The nounix switch doesn't work for me. I also found other problems with smb and rsync. It won't copy certain characters in file names properly and hangs up for a while. The nounix switch doesn't make that much sense anyway since I do not need this switch to copy from one ubuntu machine to another over SMB.

For rsync I have just created an NFS share and it works perfectly with no hassle. I will just keep the SMB share for everything else.
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: minor error with smb mount

Postby Jocko » Sat Jan 07, 2012 3:51 pm

This is an encoding problem. :?

You should check what encoding is used by your Ubuntu.

If it is different from utf-8 it is necessary to use the option iocharset in your mount command (or fstab)
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 » Thu Nov 15, 2012 4:58 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?



Finally we found a solution for this. It seems to be a bug in 3.0.24
In fvdw-sl version 14-0 we will upgrade the samba server to version 3.0.37 this will enable setting permission and time stamps of files and folders from a remote PC that has a samba share mounted.

ps when mounting a samba share on a remote PC running Linux then the files and folders will be stored under username used to mount the share. Samba won't let you change the owner of the files and folders (thats also the case on newest version and logical as the access granted based on the username that you used to mount the share.)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Previous

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 3 guests