Marc Chamberlin said the following on 02/04/2011 02:58 AM:
It appears that the USB drive is being mounted with rw permissions for the owner only, and only r permissions for groups and others. I suspect that we need to set the permissions of the mount point to be rw for everyone? We use the KDE device notifier to handle the mounting of the USB drives, but I am unable to figure out how to change the default permissions.
I'm a bit confused as to what you are asking, mentioning samba cross mounting, as well as USB files. So I'm going to focus on this paragraph. The way I see the USB file system support working under OpenSuse 2.6.3x with relevant lines in /etc/fstab is that if the USB stick is there at boot is is mounted as owned by root. If not, if you insert it later, the UDEV rules apply, and its owned by ... ME!, running KDE. Well it helps that I have configured the device notifier on my bottom panel to deal with it by name. YMMV It here I get confused about what you are saying. You seem to be saying that you are mounting the USB stick locally then exporting it via SAMBA. Is that right? You seem to be saying that because the files are marc/users/-rw-r--r-- you have a problem with two-way transfer. How is this different from if you used /home/marc/exports/ where you set the files to be -rw-rw-rw- and configured SAMBA to allow access there? Or added that directory to /etc/exports for NFS, which is a LOT simpler. I do a lot of 'transfer' between machines. But most of it is done using NFS mounts. If you are both running openSuSE why not use NFS instead of SAMBA? The nice thing about NFS is that you can set it up so many convenient (and inconvenient) ways. This includes dealing with the target being off-line and it also deals with ID mapping. See idmapd. I can see how NFS might be strange to Windows people but it grew up with *NIX and uses patterns of behaviour and layers of functionality in a way that "we" are used to, even if they seem as odd to Windows people as their practices are to "us". I do have an old Windows machine, one of my father's old laptops fr the few times I need IE or something archaic. In those situations I use the USB stick - after all, who wants to put Windows on the 'Net without a lot of patching and protection (and isn't avoiding all that pain why we use Linux?). Unlike the Linux file systems the windows file system on the USB stick has no encoded ownership. :-) So I took the risk of putting that old Windows box on the internal net (nice to have a firewall) and setting up SAMBA and a workgroup. My, this is complicated compared to NFS! But it seems that you do have control over access, provided the SAMBA server can access in that mode. So if I'm exporting /home/anton/sambaexports/ and that is -r-------- then tough luck! So it seems to me that if you exporting /media/USBSTICK/ which is marc/root/xrw-r-xr-x then ... Well I find this: http://www.cyberciti.biz/tips/how-do-i-set-permissions-to-samba-shares.html which says <quote> (a) Linux system permissions take precedence over Samba permissions. For example if a directory does not have Linux write permission, setting samba writeable = Yes (see below) will not allow to write to shared directory / share. </quote> Well, coming from the Linux world that seems reasonable to me :-) I wouldn't want a Windows thing to subvert my access permissions. All this being said, if you insist on using SAMBA to transfer files between two Linux machines instead of using NFS or rsync, and want to make the usb stick mount with different permissions, then the place to make the change is in /etc/fstab You should have a line like usbfs /proc/bus/usb usbfs noauto,defaults 0 0 If you insist on not using NFS or rsync, which is the "Linux Way" and insist on using a Windows tool to transfer between two similar Linux machines, than this is the line to change. If you read the man page for mount and look for the options for the FAT file system. You will see mention of various mask options. You can use those values instead of "defaults" I don't think this is a good thing as it is a global setting. I think using /home/marc/exports and NFS is both simpler and safer. I'm sure there is a way to set the udev rules to identify a specific stick and treat it specially, but again I don't think that is a 'clean' approach. NFS or rsync is so much simple and so less disruptive to the configuration. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org