Johng123 Posted January 9, 2010 Share Posted January 9, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/187864-chmod-entire-directory-with-htaccess/ Share on other sites More sharing options...
trq Posted January 10, 2010 Share Posted January 10, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/187864-chmod-entire-directory-with-htaccess/#findComment-992039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.