PDA

View Full Version : Setting File Permissions


Zalt4n
03-01-2005, 09:05 AM
In the File Manager in cPanel, how can I change the permissions of some of my files so I can fwrite() and fread() them in PHP?

This comes up on my website when I visit it:

Warning: fopen(hits.counter): failed to open stream: Permission denied in /home/zaltanh/public_html/index.php on line 10

I've tried playing around with the checkboxes from "Change Permissions" in the File Manager, but I can't set it correctly.

Thanks for any help.

Dan
03-01-2005, 12:16 PM
You probably want the permissions to be 775 not totally 777.

This is how it has to look

x x x
x x
x x x
-------
7 7 5

If that still doesn't work, you want it all 777 but that should work.

Zalt4n
03-01-2005, 08:09 PM
Okay, thank you. What exactly does "group" and "world" mean (for future reference)? Thanks.

Dan
03-02-2005, 01:46 AM
It's who can see the certain file. A group, the user, or the world :) They can see it, execute it, or write to it. It depends on what permission you set

Zalt4n
03-02-2005, 02:34 AM
You probably want the permissions to be 775 not totally 777.

This is how it has to look

x x x
x x
x x x
-------
7 7 5

If that still doesn't work, you want it all 777 but that should work.
I tried 775 and then 777 on all files involved with the script, but none of these removed the read/write permission. :(

Zalt4n
03-02-2005, 03:32 AM
Ignore that, it seems to be working now...

Thank you!

RealmRPGer
03-08-2005, 10:33 AM
What exactly ARE a group and user?

Zalt4n
03-08-2005, 05:50 PM
I think user is just... you, but I'm not sure exactly what group is.

Which one of user, group and world actually allows one file to access another (e.g. through f...())?