Jump to content

CHMOD entire directory with .htaccess


Johng123

Recommended Posts

Alright I bet this has been asked 100 times and it's so simple but I could not find anything when I searched!  I have a subdirectory on my server that is just all text files and needs to be automatically chmodded to 777 when a new file is created, or a file is moved to that directory.  I am using 000webhost and I don't really know if it matters, but this is what they said about htaccess: http://www.000webhost.com/faq.php?ID=16 .  I want to chmod the directory /public_html/FriendCodes/ and tried putting "chmod .htaccess files 777" in my .htaccess file in the folder in that directory, but it did not work!  What am I doing wrong?

Link to comment
Share on other sites

Firstly, .htaccess is an Apache configuration file, it cannot change permissions of files on the filesystem. Have you got shell access to the server? You'll want to look at setting the 'sticky bit', this will ensure all files within a  certain directory inherit the permissions of that directory.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.