|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Lowest Directory Permission
Hi all, im creating a gallery script the script reads need to write images to a dir and delete images (and folders) from this dir.
Whats the lowest chmod (numerically) i can take it to and still have it function. 777 isnt the best ![]() Thanks to all Taz |
|
#2
|
||||
|
||||
|
It depends on how your web server is set-up... so for example:
755 (rwx r-x r-x) would work if it was the directory owner that was writing to itnd you wanted any user to be able to list its contents (no biggie). 775 (rwx rwx r-x) would work if the user writing to the directory was in its group. And so on... to work out the permissions you want, first have a look at: http://snap.nlc.dcccd.edu/learn/madden/intro/perms.html And then, experiment to work out what will work best on your host ![]() |
|
#3
|
||||
|
||||
|
The other thing you'll want to do is pick up on the security concerns this script is going to introduce (you're running this from the web?). What language are you using to write the script?
|
|
#4
|
|||
|
|||
|
Hi, its written in PHP. Its pretty secure i think, only image files are saved depending on there headers, everything else is discarded. What else can I do?
Cheers Taz |
|
#5
|
|||
|
|||
|
Make sure you do not give 777 permissions to the directory unless you really require it. If you are running this PHP script from APACHE the permission should be some thing like this:
drwxr-xr-x 2 apache apache 1024 Dec XX XX:XX images If your webserver runs as apache user and apache group.
__________________
Nikunj MYSQL/PHP/XML ** Expertise comes with experiece ** Nikunj |
|
#6
|
|||
|
|||
|
My users will most likely not be proficient enough to set this up via ssh/telnet. Will they be able to apply these chmod's via ftp, or will doing so make the permissions only apply for there user account?
Cheers Taz |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Lowest Directory Permission |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|