Forum Moderators: phranque

Message Too Old, No Replies

.htaccess file to set permissions on other files

setting permissions with the htaccess file

         

JamesLively

10:34 am on Jan 27, 2007 (gmt 0)

10+ Year Member



Hi, I have 2 text files and a folder that i need to make write enabled and i would like to do so with .htaccess file so basically how can i chmod a files permission or override the file permissions so that i end up with:

textfile1.txt .... read/write permission to all users
textfile2.txt .... read/write permission to all users
\pics (FOLDER) .... read/write permission to all users

I hope this makes sense, I know i can do it via ftp or shell but in this case that would be impracticle.

jdMorgan

2:31 pm on Jan 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



.htaccess applies only to HTTP transaction settings, not operating system configuration, and thus cannot be used to set file permissions.

You could write a script, to be executed by being included within a requested page or pages, to set your file permissions if you feel this is necessary.

Usually, OS configuration and filesystem work is done by logging in to the server using TelNet or SSH, and using the server's operating system command shell to directly set permissions, copy, move, and delete files, etc.

Jim