Re: [AD] Re: file_select_ex patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Saturday 17 September 2005 04:36 am, Elias Pschernig wrote:
> On Fri, 2005-09-16 at 16:18 -0700, Chris wrote:
> > You can still type in /var/www or /home/web into the path bar. Or, you
> > can create symlinks in your home folder to those areas.
>
> Yes. But why hide them, if they contain writeable files and directories?

Becuase by using -r, you indicate you want listings with the read-only 
attribute. If you want to see things with a read-only attribute, don't use 
-r.

> > You can say the same about hidden directories, though. Should it show
> > hidden directories because they may contain unhidden files? And it is far
> > more likely for a directory to be marked hidden with unhidden files than
> > to be read-only with writeable files.
>
> Hidden is different though. A hidden directory means, it is something I
> usually don't want to access as user, because it has only system or
> internal files.

Not really. If you don't want a user to have access to a specific dir, you 
make it unreadable and unwriteable (/root is not readable by anyone other 
than root, for example). The hidden attribute is just a suggestive "don't 
show this under normal circumstances" flag. It is still 100% accessible and 
modifyable by users.

> Read-only just means, I have no access rights. I may have access rights
> to children though. Even the root directory itself is a good example -
> it most certainly will be read-only.

Right. A normal user can't delete or add files or directories there. So if you 
restrict selections to not include read-only, why would you want to allow 
users to browse there and put in a filename to save to?

> > Directories can have a read-only attribute. It affects all files created
> > in them, and has an affect that you can't delete/move it, or its
> > contents. At most, you can only modify files in it *if* (and that's a big
> > if) there's files marked writeable to you.
>
> There's no if at all. Under linux, even the root directory is read-only
> normally, and certainly you have writeable files somewhere under it.

There are some noteable and general exemptions, yes (/home being the main 
one). But /usr, /etc, /opt, /sbin, /bin, /sys, /proc, etc... all those are 
marked read-only, and their sub-dirs are marked read-only (to non-root). More 
often than not, a read-only directory will contain read-only files and 
directories. Only a select few break that rule.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/