# Can .htaccess set chmod settings?



## Distance (Apr 15, 2006)

So I was wandering. Can a .htaccess file set the chmod settings for the folder and the subfolders / files its in?

Josh


----------



## starcab (Dec 7, 2006)

No it can't change the chmod settings.But you can use it to password protect folders.


----------



## Distance (Apr 15, 2006)

Yeah I know you can do all that. J/w because it would be handy.

i didn't think it could.


----------



## MMJ (Oct 15, 2006)

I don't think you can. You should be able to do so with php, however.


----------



## Distance (Apr 15, 2006)

How would that be possible?

Josh


----------



## namenotfound (Apr 30, 2005)

You could just do that with FTP. Why complicate things by looking for "alternative methods"


----------



## Distance (Apr 15, 2006)

Okay, my thoughts were if it could be done via .htaccess it would be alot easier, why you ask?

Into a game script it was thought to implement a system where when they went onto the update manager they could select the files to update and hit submit and the script would grab the files from the update server and update them on the Ftp.

But this would mean every file would need to have the chmod settings of 777.

Hundreds of people use this script and not everyone will know how to do it so I thought if it could simply be done with .htaccess it would be alot easier.


----------



## harmor (Mar 15, 2007)

What if someone has modded the PHP files? They wouldn't like it if they were automatically replaced without their consent.


----------



## Distance (Apr 15, 2006)

Excuse me? This is a premium product and if they modded the php files they would simply untick that update.


----------



## harmor (Mar 15, 2007)

I didn't think of having an option to allow or disallow automatic updates.
Good luck with your product.


----------

