[Samba] Maxtor NAS share problem

Rick Johnson rrj0304 at verizon.net
Fri Apr 25 10:35:33 GMT 2008

Adam Williams wrote:
> what are the settings on the share you're trying to mount?  does it have 
> something like valid users = rickj

Well, that is hard to determine. If you're asking whether the drive has 
something like an "smb.conf" file containing share settings the answer 
is no. The only access I have to the Maxtor drive is via a browser 
interface. I have used the menu in that to set all files for full public 
access, but beyond that I have no finer control. (I have found via 
www.openmss.org that the underlying filesystem of the drive is Linux - 
reiser I think - but beyond that I have no data on the filesystem other 
than what I see when I smbmount the drive.)

> your user ID's in /etc/passwd on your local computer and the NAS 
> appliance may be different which is why the ls -l looks strange.

This is probably true because the drive was set up through the browser 

(I HAVE wondered whether creating a user on my Linux system with the 
same uid and gid as I see on the mounted share might work.)

FWIW, I find that I CAN (as root) chmod the files on the drive after it 
is mounted (and the privileges are remembered after a umount and 
remount), but the behavior is strange. Some examples follow:

chmod 777 changes -rwxrw-rw to -rwxr--r--

chmod 700 changes -rwxr--r-- to -rwx------

chmod 777 changes -rwx------ to -rwxr--r--

This, unfortunately, leaves me with no way that I know of to change the 
file permissions back to what they were originally. (I've tried 
resetting them via the browser interface AND from a Windows system where 
  I have the Maxtor mapped as a drive with no luck.)

Is there perhaps some sort of bitmask at work behind the scenes here?

Best Regards,

Rick J.

> Rick Johnson wrote:
>> Actually, it WASN'T root that mounted the share. It was my user 
>> account "rickj".
>> Re: NFS, to the best of my knowledge the drive doesn't support it.
>> And I TRIED using -o uid=1000,gid=100 (the respective user and group 
>> IDs of "rickj") with the smbmount command (AND the mount command) but 
>> the ownership still shows as it did below in my example.
>> Note: On my system "mount" doesn't recognize "-t cifs" and the man 
>> page on smbfs says the following.
>> "Mount options for smbfs
>>        Just like nfs,  the  smbfs  implementation  expects  a  binary 
>> argument  (a  struct smb_mount_data)  to  the  mount  system  call. 
>> This argument is constructed by smbmount(8) and the current version of 
>> mount (2.12) does not know anything about smbfs."
>> Best Regards,
>> Rick J.
>> Adam Williams wrote:
>>> root is owing the files because the user root mounted the share.  if 
>>> you want to support unix file ownership in your rsync you should use 
>>> NFS if the unit supports that.  to change the group ownership, pass 
>>> the -o gid=some_group on your mount -t cifs command.  you can also 
>>> use uid= and to use both, -o uid=someone,gid=somegroup
>>> Rick Johnson wrote:
>>>> I have a network accessible ( Maxtor Shared Storage 
>>>> drive that I want to use to backup the Linux (Slackware) systems on 
>>>> my private LAN. I can "smbmount" the drive okay on my Linux systems, 
>>>> but when I try and use rsync to do a backup rsync fails with a 
>>>> message about failing to change owner.
>>>> Digging a little deeper into the problem I find that the 
>>>> directories/files on the share all look something like the following
>>>> drwxr-xr-x  1 35000 root       0 2008-02-12 15:21 ArchiveOnLinux
>>>> drwxrwxrwx  1 35003 root       0 2008-04-22 01:01 Public
>>>> -rwxrw-rw-  1 35000 root 1127239 2008-02-28 11:28 gw_rn_vp_grey.pdf
>>>> which ISN'T the user (or group) I would have expected it to be 
>>>> mounted as. (I've done a chmod u+s /usr/bin/smbmnt to allow users to 
>>>> mount the share and I expected that the share would have the same 
>>>> owner as the user that mounted it.)
>>>> I've also found that I can't change ALL permissions ALL the time on 
>>>> the share's directories and files. I can remove group and world 
>>>> privileges from a file (which are remembered after a umount and 
>>>> remount) but I cannot restore them (even as root). Only the owner 
>>>> privileges are consistently changeable.
>>>> Basically, ALL I want to do is to be able to use the drive as a 
>>>> backup that will maintain the same permissions, user, group, etc., 
>>>> as the original files AND I want the files visible from both my 
>>>> Linux AND Windows systems (because I need to use Nero on a Windows 
>>>> machine to do the backups). Can someone help me figure out how to do 
>>>> this correctly?
>>>> Thanks,
>>>> Rick Johnson

More information about the samba mailing list