You are not logged in.

#1 2010-09-15 12:28:19

Doctor Drive
Member
From: Ukraine
Registered: 2010-08-11
Posts: 167
Website

[Solved] Cannot access non-executable directories

After I copied some folders and files from CD I had permission denied trying to access as a normal user.
So I did

sudo chown -R doctor:users folder
sudo chmod -R 777 folder

After that, the folder and files became executable.
So, in directory Music/ I had some executable folders and files.
I thought I can make it all non-executable recursively...

sudo chmod -R -x Music/

And now it's non-executable.
But wait

[doctor@doctor ~]$ cd Music/
bash: cd: Music/: Permission denied

I cannot access non executable folders?!

After I make them executable again, I can access.

[doctor@doctor ~]$ chmod -R +x Music/
[doctor@doctor ~]$ cd Music/
[doctor@doctor Music]$

wtf?

Last edited by Doctor Drive (2010-09-15 12:55:44)

Offline

#2 2010-09-15 12:34:04

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,401
Website

Re: [Solved] Cannot access non-executable directories

yeah...  read the man page.  That is the way it works.

Online

#3 2010-09-15 12:52:28

Doctor Drive
Member
From: Ukraine
Registered: 2010-08-11
Posts: 167
Website

Re: [Solved] Cannot access non-executable directories

Didn't get how it works though..
But a way to solve is

chmod -R 775 Music

And for files...

find ./Music/ -type f -exec chmod 664 {} \;

Though still didn't get why must folders have different permissions...
Too much to study that chmod thing...

Last edited by Doctor Drive (2010-09-15 12:55:18)

Offline

Board footer

Powered by FluxBB