I’m using Samba to access a mixed (XPpro, Win7, openSuse) home network.
I’m having inconsistant results when copying shared folders from my
linux laptop to my linux desktop. Via Nautilus, on /home/scott/Documents,
I have checkmarked “Share this folder” and “Guest access”, the share
name is Documents.
I expected every folder under Documents to become shared but that’s not
the case. I have a smattering of subfolders that I created that return
a permissions error. If I checkmark the Share and Guest on each error
then all is well, but what a pain. I’ve been reading guides on swerdna
but not finding answers.
why are some of the folders I made shared by default and others not?
how do I use terminal to a) view permissions b) set share permissions
of every folder in a tree structure in a recursive manner rather than
one at a time?
sbeyerkc, if I might make a suggestion for use in a mixed system to consider. Since these are mixed Windows/Linux systems and dual boot system I have decided to only share NTFS partitions and not the home area. I modify the fstab file (etc/fstab) so the the option setting for the NTFS partition is set to defaults. Here is an example fstab entry from my computer:
With the default setting and only sharing NTFS partitions, all Linux and Windows machines have full read/write permissions between computers. When you copy a file from one machine to another, it resides in this NTFS partition which can be called /Windows/C for instance and from where you then copy your files to your home area, or just use them from the NTFS area in /Windows/C. Making this change has made it easy to share between computers with no permission errors. I would not do it this way if all machines where Linux, but it works the best in a mixed system using Samba.
Your method is not working, if you don’t find a solution, consider how I do it and good luck.
Thanks for the suggestion but after editing fstab on my laptop I see no difference in my problem. My linux desktop can see my dual-boot laptop folders and will copy most of them but about 20% return Error while copying. “The folder xyz cannot be handled because you do not have permissions to read it.” I don’t know how to tell who does have permission, if anybody, or an elegant way to make all the permissions the same. And I don’t understand why some are shared and others are not. For what it is worth, I’m trying to copy folders between openSuse environments, not from a windows partition.
Is a nice way of showing the file permissions but You have to use the terminal. Here is a good read on the topic if You’re interested Linux Files and File Permissions
I think You can also enable nautilus to show them. In dolphin You have to select detailed view and then go view->additional information->permissions. You should see something like rwxr-xr-x in one of the columns.
Greg - thanks for the reply. You sent me down the right path. I made some notes on what I’ve learned so far, thought they might help someone else…
What I’ve learned about permissions…
(someone correct me if I’m wrong)
In order for computer A to receive folders from computer B the “others” permissions on computer B must be set to executable. The terminal command ls -l will show permissions. In Nautilus, you can set Edit/Preferences, List Columns tab to show Group, Owner, Permissions etc.
For example: drwx------ 1 scott users 7652 2011-01-10 11:30 bogus/
will not copy from B to A. The d indicates directory, the next 3 bits (rwx) indicate that the “user” has read/write/execute permissions, the next 3 bits (—) indicate that the “group” does not have any permissions, and the last 3 bits (—) indicate that “others” do not have any permissions.
There are several ways to modify “others” permissions.
from terminal… chmod o+x bogus
This results in: drwx-----x 2 scott users 4096 2011-01-10 11:42 bogus/
from terminal… chmod 701 bogus
This results in the exact same thing as example 1)
from Nautilus, right click on the folder, select Properties, then on the
Permissions tab, set the Others Folder access to “Access files”.
This results in: drwx—r-x 2 scott users 4096 2011-01-10 11:42 bogus/
which is slightly different because “others” have been given read permission.
I got most of this from Scott Graneman’s Linux Phrasebook. What I’m not clear on yet is if the “others” read permission needs to be set to copy the directory. Also, I’m not clear on how Sharing fits into the Permissions picture.
It’s very simple really. In the examples You provided the directory bogus is owned by scott and it belongs to the group users so if You are neither scott or member of the users group the rights for others apply to You.