Permissions fail to change, even using sudo nautilus

I've read a lot of threads here but still can't seem to make this work: I'm trying to share various folders (any folders whatsoever) on HDDs other than "File System" over the LAN using fresh install of Ubuntu 12.04 with a fresh version of Apache installed. Other (Win XP) computers can see the shared folders over the network no problem, but come up with the error:

"[Folder] is not accessible. You might not have permission to use this network resource. Contact the administrator..." (The typical WinXP "access denied" message)

Since I can see them alright, I've been led to believe that I need to set the folder permissions so that "Others" can read, if not read/write. Since these are folders on completely different HDDs than my OS, I shouldn't be too afraid of changing permissions (right?).

So, even when I run sudo nautilus and go to the containing folder and right click -> properties -> permissions, I see:

Others
Folder Access: None
File Access: ---

When I change Folder Access (again, coming from nautilus window), it changes for about half a second and then revert. When I change File Access, it stays in the drop-down, but doesn't stick after closing and re-opening properties. "Allow executing file as program" also instantly reverts.

Why? (And thank you!)


Solution 1:

N.B. don't attempt this on your root directory. I'm assuming you are talking about a data directory owned by the user.

I can't comment on the first (Windows-centric) part of the question, but I can tell you how to change permissions via the command line. You can give "others" read and write permissions using

chmod -R o+wrX /path/to/directory

The -R flag is to make it recursive (i.e. repeat for all the contents of the directory. o means for others, and +wr means give them write and read permissions. X means give execute permissions only if it's a directory, which allows you to descend into that directory (the man page calls it "search"). Presuming you are the owner of the directory/files, you should not need sudo.

Solution 2:

This problem has occurred to me too, but never bothered to correct it the GUI way. However, you can change the folder permissions, if that is the problem, by opening a terminal and then typing the following:

chmod 775 <folder_name>

This gives the normal folder permissions to the folder given by the name folder_name. If it asks you to be root, then prepend the command by sudo. To know more about the chmod command, have a quick look at this Wikipedia page, it gives a good detail and couples it with examples which can help you understand it better. To just know about the numerical options, have a look here. Hope this helps.

EDIT: Added links to make it a little more explanatory.