online file browser help!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vangelis
Forum Newbie
Posts: 23
Joined: Thu Jun 05, 2003 6:35 am

online file browser help!!

Post by vangelis »

Here is what i am trying to do...
i am trying to create an online file browser for my site. It works fine offline on my PC but online is a different story. I get a 'permission denied' warning when i try to access the directory where my files are in. The server has several users files stored and i understand that some sort of authorisation is required. I do ofcourse have the username and password for my site, but what it should do is access only MY directory directly without messing around with other people's directories.

This is the warning message i get:
Warning: opendir(/home/username/): failed to open dir: Permission denied

How can i authenticate and view my files? Any help would be appreciated
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post by daven »

You need to CHMOD the directories to permit reading. Try 755ing them.
in the shell: chmod 755 /the/directory/path
in PHP: chmod("/the/directory/path", 0755)
vangelis
Forum Newbie
Posts: 23
Joined: Thu Jun 05, 2003 6:35 am

Post by vangelis »

you mean without providing a username and a password...if that works i will have access to other users directories and will be able to tamper with their files!!
Post Reply