public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* x bit for dirs: misfeature?
@ 2001-11-19 16:22 vda
  2001-11-19 14:36 ` James A Sutherland
                   ` (3 more replies)
  0 siblings, 4 replies; 40+ messages in thread
From: vda @ 2001-11-19 16:22 UTC (permalink / raw)
  To: linux-kernel

Everytime I do 'chmod -R a+rX dir' and wonder are there
any executables which I don't want to become world executable,
I think "Whatta hell with this x bit meaning 'can browse'
for dirs?! Who was that clever guy who invented that? Grrrr"

Isn't r sufficient? Can we deprecate x for dirs?
I.e. make it a mirror of r: you set r, you see x set,
you clear r, you see x cleared, set/clear x = nop?

Benefits:
chmod -R go-x dir (ensure there is no executables)
chmod -R a+r dir (make tree world readable)
mount -t vfat -o umask=644 /dev/xxx dir
	(I don't want all files to be flagged as executables there)

These commands will do what I want without (sometimes ugly) tricks.
For mount, I can't even see how to do it with current implementation.

What standards will be broken?
Any real loss of functionality apart from compat issues?
--
vda

^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: x bit for dirs: misfeature?
@ 2001-11-20 16:05 Thomas Hood
  2001-11-21 10:34 ` Helge Hafting
  0 siblings, 1 reply; 40+ messages in thread
From: Thomas Hood @ 2001-11-20 16:05 UTC (permalink / raw)
  To: linux-kernel

Please forgive me if I overlooked the message that
already said this, but ...

James Sutherland wrote that "There are valid uses for
X only directories (i.e. users are not allowed to list 
the contents, only to access them directly by name).
R-only directories make little sense".  Then there
followed a long discussion about the utility of "--x"
directories.  (I agree that they aren't a very good
idea, since an explorable directory can be "listed" by
trial and error on the filenames within it.)

However, a decent reason for having separate r and x
is that "r--" directories _do_ make sense.  When a
directory is "r--", its contents can be _listed_ but the
directory cannot be browsed.  Observe:     // Thomas Hood


jdthood@thanatos:~/tmp$ ls -l
total 8
drwxr-xr-x    2 jdthood  jdthood      4096 Nov 20 10:59 ./
drwx------   89 jdthood  jdthood      4096 Nov 20 10:55 ../
jdthood@thanatos:~/tmp$ mkdir --mode=777 test
jdthood@thanatos:~/tmp$ ls -l
total 12
drwxr-xr-x    3 jdthood  jdthood      4096 Nov 20 10:59 ./
drwx------   89 jdthood  jdthood      4096 Nov 20 10:55 ../
drwxrwxrwx    2 jdthood  jdthood      4096 Nov 20 10:59 test/
jdthood@thanatos:~/tmp$ touch test/1
jdthood@thanatos:~/tmp$ touch test/2
jdthood@thanatos:~/tmp$ ls -l . test
.:
total 12
drwxr-xr-x    3 jdthood  jdthood      4096 Nov 20 10:59 ./
drwx------   89 jdthood  jdthood      4096 Nov 20 10:55 ../
drwxrwxrwx    2 jdthood  jdthood      4096 Nov 20 10:59 test/

test:
total 8
drwxrwxrwx    2 jdthood  jdthood      4096 Nov 20 10:59 ./
drwxr-xr-x    3 jdthood  jdthood      4096 Nov 20 10:59 ../
-rw-r--r--    1 jdthood  jdthood         0 Nov 20 10:59 1
-rw-r--r--    1 jdthood  jdthood         0 Nov 20 10:59 2
jdthood@thanatos:~/tmp$ chmod ugo-x test
jdthood@thanatos:~/tmp$ ls -l . test
.:
total 12
drwxr-xr-x    3 jdthood  jdthood      4096 Nov 20 10:59 ./
drwx------   89 jdthood  jdthood      4096 Nov 20 10:55 ../
drw-rw-rw-    2 jdthood  jdthood      4096 Nov 20 10:59 test/

ls: test/.: Permission denied
ls: test/..: Permission denied
ls: test/1: Permission denied
ls: test/2: Permission denied
test:
total 0
jdthood@thanatos:~/tmp$ chmod ugo-r test
jdthood@thanatos:~/tmp$ ls -l . test
.:
total 12
drwxr-xr-x    3 jdthood  jdthood      4096 Nov 20 10:59 ./
drwx------   89 jdthood  jdthood      4096 Nov 20 10:55 ../
d-w--w--w-    2 jdthood  jdthood      4096 Nov 20 10:59 test/

ls: test: Permission denied



^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2001-11-21 23:01 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-19 16:22 x bit for dirs: misfeature? vda
2001-11-19 14:36 ` James A Sutherland
2001-11-19 16:58   ` vda
2001-11-19 15:04     ` Tim Waugh
2001-11-19 15:29       ` Richard B. Johnson
2001-11-19 16:00     ` James A Sutherland
2001-11-19 17:43       ` Kai Henningsen
2001-11-19 18:24       ` vda
2001-11-19 16:44         ` Horst von Brand
2001-11-19 17:24           ` James A Sutherland
2001-11-19 19:39             ` vda
2001-11-19 19:07               ` James A Sutherland
2001-11-20 13:03                 ` vda
2001-11-19 21:01               ` Flavio Stanchina
2001-11-19 19:21           ` vda
2001-11-19 18:14             ` Horst von Brand
2001-11-20 11:20               ` Anton Altaparmakov
2001-11-20 12:01                 ` Alexander Viro
2001-11-20 15:08                 ` Anton Altaparmakov
2001-11-20 17:18                 ` Mike Castle
2001-11-20 17:37                   ` Alexander Viro
2001-11-20 12:58               ` vda
2001-11-19 16:47     ` Jesse Pollard
2001-11-19 17:15       ` David Ford
2001-11-19 17:37     ` Pascal Schmidt
2001-11-19 18:42     ` J Sloan
2001-11-19 14:46 ` Alexander Viro
2001-11-19 17:03   ` vda
2001-11-19 15:07     ` Shaya Potter
2001-11-19 15:12     ` Alexander Viro
2001-11-19 15:19     ` Mathijs Mohlmann
2001-11-19 15:36     ` Gerhard Mack
2001-11-19 16:19     ` Horst von Brand
2001-11-19 22:36     ` Lionel Bouton
2001-11-19 15:12 ` Mathijs Mohlmann
2001-11-19 17:41   ` vda
2001-11-20  0:38 ` Albert D. Cahalan
  -- strict thread matches above, loose matches on Subject: below --
2001-11-20 16:05 Thomas Hood
2001-11-21 10:34 ` Helge Hafting
2001-11-21 23:00   ` Mike Fedyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox