[thelist] CHMOD

Kevin Martin kevin at brasscannon.net
Thu Jun 6 22:14:02 CDT 2002


Quoth Mark Joslyn <mark.joslyn at solimarsystems.com>

> I have been messing around trying to set directory settings using the CHMOD
> setting on my FTP site.

That's 'chmod' when you're at the command prompt.  Unix is CaSe-SenSiTive.

> Here is what I need:
> 1.	I want access to do whatever I want in that directory(read, write,
> execute).
> 2.	I want customers to be able to upload (only) files to that directory.
> 3.	I do not want the files in that directory to be listed if my customers
> view the directory
> 4.	I want the files to be listed when I view that directory.

Here's one part of the trick:  The same bit that is used to mark files as
"executable" is reused for a different purpose on directories.  It makes
them "searchable."  Even with the "x" bit off, though, if someone knows
the exact name of the file they want, they don't have to "search" to get
it.  They can still grab it blindly.

So... try making the directory mode 733.  That should be rwx-w--w-; group
and world write-only, not readable and not searchable.  You have to be
using the 'owner' account for that directory... so let's touch on that.

There are three classes of users (not counting root, who is God):  Owner,
Group, and World.  Unix permissions always boil down to "what group are
you in? What overlap, if any, is there between YOU as the owner, and
that other user? Is s/he in your group, or out in the world?"  So the
trick is to set up the ownership in a way that will support what you're
trying to do; then the correct chmod setting will be (almost) obvious.

> Can anyone clear this up for me - I am a newbie at UNIX, CHMOD, etc...

Try http://handsonhowto.com/unix101.html - My motto is "A little vague
handwaving saves hours of tedious explantion."  The discussion of
chmod could use some fresh blood, and you'd be doing me a favor by
sending me "real-world" questions on the discussion board there.  :-)

--
Kevin "digger" Martin <evolt at brasscannon.com>



More information about the thelist mailing list