Is this a bug? File permissions and ext4 [SOLVED]

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Level 1
Level 1
Posts: 2
Joined: Sat Jun 23, 2012 3:45 pm

Is this a bug? File permissions and ext4 [SOLVED]

Postby ronin701 » Sat Jun 23, 2012 4:05 pm

I was setting file/directory permissions, specifically I wanted to remove execute permissions from a directory and it's contents and I found something interesting that I didn't see in previous file systems.
If I chmod 644 it works fine on a specific file, allowing user rw, group and others r, but if I chmod -R 644 \mydirector it removes the users access to the directory, I also tried a-x recursive with the same result????
In the Info Properties GUI it shows; owner - List, create/delete, no access, group - List files only, Others - List files only.
Kinda weird!
Anybody else come across this or have a workaround?
BTW, I'm running Mint 13 Mate edition and it's fantastic, big whooyaa to the development team..........

Thanks for the info, missed the subtle difference between folder execution and file execution.
I guess this is one place where the Info Properties GUI is more useful than the terminal, I can uncheck execute, apply permissions to enclosed files and be on my happy way (as long as there are no contained directories of course)<G>.
Last edited by ronin701 on Sat Jun 23, 2012 9:11 pm, edited 3 times in total.

User avatar
Level 24
Level 24
Posts: 21649
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Is this a bug? File permissions and ext4

Postby xenopeek » Sat Jun 23, 2012 4:14 pm

Read up a bit on Linux filesystem permissions :wink: For example here: ... ermissions

The execute bit on a directory controls whether you can browse the contents of the directory, not whether you can execute it :wink:

Level 18
Level 18
Posts: 8834
Joined: Tue Feb 03, 2009 10:27 am

Re: Is this a bug? File permissions and ext4

Postby altair4 » Sat Jun 23, 2012 4:31 pm

And just in case you are tempted to go to the opposite extreme and do the following:

Code: Select all

chmod -R 755 /mydirector

That's not right either since you will not only set directories to be executable, which you must have, but also every file which you probably don't want to have.

The octal mode in chmod isn't smart enough to differentiate between a folder and a file so I would suggest something like the following:

Code: Select all

chmod -R a+rwX,go-w /mydirectory

Every folder will be executable, group and other will be read only, owner has full access, but files will not be set to executable unless they were that way to begin with. That's what the big "X" does.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Return to “Other topics”