LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-08-2004, 05:42 AM   #1
suguru
Member
 
Registered: Dec 2003
Location: Voluntarily move into diaster relief areas.
Distribution: Upgraded from Suse 10 to Ubuntu.
Posts: 104

Rep: Reputation: 15
Why does sudo mkdir -m766 0/subdir deny?


I can't understand why mkdir doesn't permit subdir entrance
d@wg:~$ sudo mkdir -m766 0
Password:
Sorry, try again.
Password:
d@wg:~$ ls -ls
total 16
4 drwxrw-rw- 2 root root 4096 2004-11-08 04:24 0
4 drwxr-xr-x 3 d d 4096 2004-11-05 08:09 56
4 drwxr-xr-x 3 d d 4096 2004-11-07 22:39 8
4 drwx------ 3 d d 4096 2004-11-05 08:43 Desktop
d@wg:~$ sudo mkdir -m766 0/churchState
d@wg:~$ ls -ls 0
ls: 0/churchState: Permission denied
total 0
d@wg:~$ sudo ls -ls 0
total 4
4 drwxrw-rw- 2 root root 4096 2004-11-08 04:25 churchState
d@wg:~$ sudo mkdir -m777 0/churchStateSep
d@wg:~$ ls -ls 0
ls: 0/churchState: Permission denied
ls: 0/churchStateSep: Permission denied
total 0
d@wg:~$ sudo ls -ls 0
total 8
4 drwxrw-rw- 2 root root 4096 2004-11-08 04:25 churchState
4 drwxrwxrwx 2 root root 4096 2004-11-08 04:28 churchStateSep
d@wg:~$
d@wg:~$ cd 0
bash: cd: 0: Permission denied
d@wg:~$ sudo cd 0
sudo: cd: command not found
d@wg:~$
 
Old 11-08-2004, 06:07 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
The execute bit for directories is what allows entry. The 0766 allows reading the files, creating new files, but not entering the directory or access subdirectories for the group or other users.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 04:20 PM
never_direct deny all vs. always_direct deny all simplyrahul Linux - General 1 02-16-2005 03:42 PM
deleting all *.m3u files in a directory+subdir? minm Linux - Newbie 5 10-12-2004 04:31 PM
How to change owner and group in a directory to include subdir and all files Lakota Linux - General 2 07-15-2004 10:35 AM
mkdir help... Linux~Powered Linux - Software 2 06-13-2004 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration