Gossamer Forum
Home : Products : Others : Fileman :

Users Directory permissions

Quote Reply
Users Directory permissions
Hi

How do I stop a non siteadmin user from accessing the site root dir?

Saw this at WHT






Had to make one small edit to get it to work for "normal" (non site-admin) users:

"fileman.pl" just dies on line 52 when any user except siteAdmin tries to
login. Check here:

unless ($members =~ /$ENV{REMOTE_USER}/) {
die sprintf ($GT::FileMan::Commands::LANGUAGE{COBALT_BADGROUP},
$root_dir, $ENV{REMOTE_USER});
}

If you take out this line:

die sprintf ($GT::FileMan::Commands::LANGUAGE {COBALT_BADGROUP}, $root_dir, $ENV{REMOTE_USER});

and replace it with something like

my ($user_dir) = $dir =~ m,^(/home/sites/\w+/users/$ENV{REMOTE_USER}),;
$root_dir = $user_dir;

It will now just work fine with all site users by putting users in their respective home directories if they are not site_admins. And they will not be able to access the upper level dir.

I did that and even the lowliest of user could log in and manage his personal web space.



__________________
Gary Harris
http://www.dixiesys.com/







I don't dare to change the code myself... don't know perl that well.

Thanks.

Quote Reply
Re: [zbco] Users Directory permissions In reply to
Hi,

A non siteadmin should not be able to use the program, it should display a message saying only site admins can access the program.

Are you seeing something different?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Users Directory permissions In reply to
My normal users (non siteadmin) are shown the / containing certs, web, users. I tried uploading files to / and the files are uploaded.

Last edited by:

zbco: Jan 23, 2002, 10:30 AM