Help - Search - Members - Calendar
Full Version: Home Directory Permissions
Linuxhelp > Support > Technical Support
[BH]boogieman
I'm new to Linux, and having a bit of trouble with some things. I can't seem to find any documentation to help me with my problems, so once again I'm asking my peers for help.

So I created a public_html in my home directory, but I couldn't access anything in it from my browser. I soon realized that the permissions on my user's home directory were set to drwx------. So I changed them to drwxr-xr-x (no, drwxr--r-- didn't work), and then I could access with my browser just fine.

The problem I'm having is that (seemingly) randomly, my home directory permissions are resetting to drwx------, apparently without me doing anything. I've tried setting these permissions as both the user and as root, and neither seems to keep it that way. Are there any ideas of what I can do about this? Has anyone else had/heard of this problem?

I'm using MandrakeLinux 9.2, if that helps. If I had to do it all over again, I would go with something else... seems like Mandrake's default settings have caused me more of a headache than the installation altogether.

Thanks a lot everyone.
hughesjr
My advise, if you are on your own server, is to move the directory outside the home directory and set it up in /etc/httpd/conf/httpd.conf

There are probably scripts that check file permissions in home directories and are not happy when other people can get into your home.

In a normal install if there is only one website on the server, it normally goes in /var/www/html.

If I have more than one server, I normally put them in /var/www/[i]domain_name[/b] ... like:

/var/www/hughesjr.com and /var/www/otherdomain.com, etc.

That doesn't work well if you are an ISP and want to restrict people to there home directory only ... it does work OK if you have full server access.

Then in /etc/httpd/conf/httpd.conf I have this in the file:
QUOTE
<VirtualHost *:80>
    ServerName www.hughesjr.com
    ServerAlias hughesjr.com
    DocumentRoot /var/www/hughesjr.com
<Directory "/var/www/hughesjr.com">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
    ErrorLog logs/hughesjr.com-error_log
    CustomLog logs/hughesjr.com-access_log combined
</VirtualHost>
[BH]boogieman
Thank you much; your help is most appreciated.

I used kind of a variation of your suggestions. I made user directories under /var/www/html. So for user acraft, the directory is /var/www/html/acraft. Then, I made a symbolic link to the newly created directory from the user's home directory (that's /home/acraft) called public_html. Kind of a weird way of doing it, and I'll probably modify it as I go along. I also had to mess with the .conf files.

Anyway, now I've got another problem, which is unrelated, so I'll list it in a different thread.

Thanks again!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.