Fluf Posted October 28, 2008 Share Posted October 28, 2008 The thing is I have several users in my slackware box and i'm running websiste too in this box. But i can't find a right chmod for protecting some folders and files.All i want to do is this. protect folder data/ from normal users, only root can enter in there, but i want that everybody is able to get in this folder via browser, not to view files, but to see the front page.. Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/ Share on other sites More sharing options...
corbin Posted October 28, 2008 Share Posted October 28, 2008 Then the Apache user will need access. Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-676981 Share on other sites More sharing options...
Fluf Posted October 29, 2008 Author Share Posted October 29, 2008 Well i have this folder access to user nobody which is apache user with command chown -R nobody data/ still it says forbidden when i try to access with browser and chmod is 750 Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-677185 Share on other sites More sharing options...
rocoso Posted October 29, 2008 Share Posted October 29, 2008 Restrict users to there home directorys. Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-677202 Share on other sites More sharing options...
Fluf Posted October 29, 2008 Author Share Posted October 29, 2008 But there are other solutions too..i would like to know :/ Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-677429 Share on other sites More sharing options...
corbin Posted October 29, 2008 Share Posted October 29, 2008 Just to make sure it's a file permissions error and not an Apache configuration error, temporarily change the access to 777. If it works, it's a permission error. If not, it's Apache config. Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-677843 Share on other sites More sharing options...
Fluf Posted October 30, 2008 Author Share Posted October 30, 2008 It's not apache fault, i know how chmod works and stuff, but this thing what i want just don't work. 1 for execute, 4 - read, 2-write and i what i want is something like this. 750, normal user has no access to this folder, but with browser you can get access to this folder. Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-678199 Share on other sites More sharing options...
steviewdr Posted October 31, 2008 Share Posted October 31, 2008 suPHP will execute php files as the user. In your case, what is apache running as? Is it "nobody"? You also said "chown -R nobody data/" Well where is that data folder stored? All parent folders must be executable by the world. I.E. /home/user/data chown -R nobody data/ chmod 700 data You also have to do this: chmod 711 /home/user -steve Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-679321 Share on other sites More sharing options...
Ghulam Yaseen Posted November 2, 2008 Share Posted November 2, 2008 You can use this cd /home/user/data chown -R nobody data/ chmod 644 data -rw-r--r-- 1 nobody user 0 Nov 1 23:15 data/ Mostly the site use this chmod combination The thing is I have several users in my slackware box and i'm running websiste too in this box. But i can't find a right chmod for protecting some folders and files.All i want to do is this. protect folder data/ from normal users, only root can enter in there, but i want that everybody is able to get in this folder via browser, not to view files, but to see the front page.. Quote Link to comment https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-680347 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.