Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!)

share|improve this question
2  
What is the filesystem on "HDDs other than "File System""? If you have FAT or NTFS there that would explain why you can't change permissions. –  Sergey Dec 29 '12 at 3:58
    
@Sergey Good point. –  Sparhawk Dec 29 '12 at 4:33
add comment

3 Answers 3

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.

share|improve this answer
    
Doesn't this make all files executable?! –  Sparhawk Dec 29 '12 at 4:13
    
Do you mean all files inside the folder folder_name? I don't think so, since it is the default folder permission for all folders in /home/user folder. –  i08in Dec 29 '12 at 4:14
    
Oh I see... sorry I misread it. I presumed you were making it recursive (i.e. with -R flag). Hence +x for directories allows others to navigate (cd) into the directory. The problem with not making it recursive, is that the permissions of subdirectories and files will not be changed. –  Sparhawk Dec 29 '12 at 4:18
    
Ya, that's right, but you never know the permissions for sub-directories. But still, probably you are right, as this won't, at foresight, do any harm. –  i08in Dec 29 '12 at 4:22
1  
Jobin, can you give a link to the OP explaining the chmod command (and the meaning of numbers like 775 or 664)? It would make your answer even better I think... –  don.joey Dec 29 '12 at 10:25
show 1 more comment

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.

share|improve this answer
add comment

Sorry, but none of the above works. I have an NTFS partition /media/WinWork. I am the owner. But I can't change permissions either from Mautilus, gksudo Nautilus, or command line. None of the above-mention commands work. The permissions do not take: they revert back immediately.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.