Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-06-04 10:12:36
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Folder permissions, chmod
Which are correct chmod values for different TXP folders? Just want to check…
Offline
Re: Folder permissions, chmod
That totally depends on your server setup, but 777 is rarely the answer to that question.
Offline
Re: Folder permissions, chmod
ruud – won’t 777 for all folders permisions harm site’s security?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Folder permissions, chmod
Yes (in most cases), which is why 777 is rarely the correct answer (read: permissions should be as strict as the server setup allows)
Offline
Re: Folder permissions, chmod
Hi, this is an old post but it seems it fits to my needs.
I’m moving my sites to another hosting (leaving MT if you must know, yes they were great but not any more, at least not for me).
Anyway, I took VPS, set everything, it’s all fine, but txp gives me errors in diagnostics that tmp, images and files are not writable.
But, when I chmod-em to 777 all fine!
I underastand that 777 is a security risk, and since I’m on a VPS and I can do whatever is necessarily on the LAMP, there must be a way to chmod this files to something else.
Anybody knows what should I do?
Thanks
Last edited by AndrijaM (2010-03-11 15:25:59)
Offline
Re: Folder permissions, chmod
ok, I’ve found the solution, so here it is, if someone needs it:
Keep the permissions 755 (711, 700) and chown to the same user that runs the Apache. With Debian or Ubuntu, this will be the user “www-data”. The command is:
sudo chown -R www-data /path/to/folder
Last edited by AndrijaM (2010-03-11 20:13:12)
Offline
Re: Folder permissions, chmod
I know this old chestnut will make Ruud’s eyes roll, but I’ve always been confused about folder permissions and why permissions on….
- /files
- /images
- /textpattern/tmp
constantly need to be fixed every time I move a site up to or down from production (at least it seems that way).
I keep hearing/seeing that 777 is not safe, and I have no doubt it’s not, but why is it most often the case that only 777 will work?
This isn’t just with web hosts, but my local setup too. The Txp help tip on the associated diagnostic recommends using 755, but I chmod away in Terminal and it works not. This has got to be a confusing/frustrating situation for people (besides me).
I’m curious about what Adrija is saying above, because I’ve not seen that mentioned before, but I don’t quite get what he’s saying. Is it relevant? Can someone clarify?
Offline
Re: Folder permissions, chmod
Destry wrote #297327:
This isn’t just with web hosts, but my local setup too. The Txp help tip on the associated diagnostic recommends using 755, but I chmod away in Terminal and it works not. This has got to be a confusing/frustrating situation for people (besides me).
Same here … and I chmod away in Transmit (777 it is) … for years now … :(
Last edited by RedFox (2016-01-12 10:52:39)
Offline
Re: Folder permissions, chmod
- chown the directories/files to the webserver daemon user.
- change the webserver configuration so PHP scripts for your website are run under your username.
Offline
Re: Folder permissions, chmod
ruud wrote #297355:
change the webserver configuration so PHP scripts for your website are run under your username.
Know a source that explains that a bit more? Where I would go in the haystack and what I would do when I got there…
Offline
Re: Folder permissions, chmod
If you’re using Apache, google for mod_ruid2
Offline
Re: Folder permissions, chmod
Destry wrote #297500:
Know a source that explains that a bit more? Where I would go in the haystack and what I would do when I got there…
Maybe this could be interesting: processwire.com/docs/security/file-permissions/
Last edited by kai (2016-01-20 19:47:02)
Offline