Gossamer Forum
Home : Products : Others : Fileman :

Got this 91% working, but some sub-directory file access trouble

Quote Reply
Got this 91% working, but some sub-directory file access trouble
Hi

Can you spare me a little advice?

Have installed and got your great program working, but there a few glitches that I cannot seem to fix.


My ISP is running Apache 1.3.3 on a Unix server, but flock() is not supported so I have set this to 0.


I can create a new sub-directory from the main public directory , and add files to that sub-directory. A .htaccess file is created pointing to my password file. I can add and delete users - and the password file is updated correctly. I can edit files in the new directory through Fileman.

However, when I try to view a sub-directory file, I always get a "Forbidden" error. Frown I think I've set everything up OK but cannot seem to overcome this problem.

I have tried setting the show_pass = 0 , but I still have the same problems with accessing directories created by Fileman. Strangely enough, I have no trouble seeing these files if I connect in via FTP.

Please feel free to have a look at my setup (below) - any advice would be gratefully received.

Tony MacDonnell
London UK

cgi.www.macdonnell.co.uk/cgi-bin/www.macdonnell.co.uk/fileman/fileman.cgi


[This message has been edited by tony_macdonnell (edited April 26, 2000).]
Quote Reply
Re: Got this 91% working, but some sub-directory file access trouble In reply to
I tried to check your setup out but you did not supply a password. My offhand suggestion would be to use your ftp program to check the pemmisions on the directories that you have a problem with, you might have to set them to 666 or 777. The program might be setting them to the wrong permisions. The program might also be setting them up to be owned by user nobody. If this is the case try using: chgrp sitename directoryname(at the telnet command line in the directory that shows the directories your talking about, sometimes you must be root or admin to do this)to change them to your site name (that would be your sitename as shown in your directory path statement).

------------------


[This message has been edited by bobstennett (edited May 13, 2000).]

[This message has been edited by bobstennett (edited May 13, 2000).]
Quote Reply
Re: Got this 91% working, but some sub-directory file access trouble In reply to
Thanks for your reply (bobstennet). I removed the password access code from my original posting to this directory for obvious reasons!

However, it turns out that the problem lies with my ISP who have arranged the Apache setup so that any newly created text files default to -600 , despite the various CHMOD commands is the fileman script.

I have been able to work around the problem by putting some umask() commands in the script, around the OPEN file/CLOSE file sections.

ie.
Code:
# Write the file to the system.

$umask = umask ();
umask (02);

open(FILE,">$fullfile") or &cgierr ("Can't open: '$fullfile'.\nReason: $!");
print FILE $data;
close(FILE);

umask($umask);