How do I fix the permissions on my html directory and files?
Using WS_FTP
If you are using WS_FTP and the permissions of the files
are not -rw-r--r-- (644) or -rw-rw-r-- (664):
- Right-click on a file.
- Select File Attributes.
- Click on Read in the category Public Permissions and in the category Group Permissions.
This will allow the file to be readable by any user on the system, including
the web server user, which is needed in order to view your web page. In a
similar way you can change your directory permissions to
-rwxr-xr-x, (755).
Using UNIX
Log into the SEAS account on eniac.seas.upenn.edu and run these commands to fix the basic permissions for your website:
chmod a+x ~
chmod a+rx html
chmod a+r html/index.html
You may also need to fix the permissions on other files and directories
recursively, following this example for the ~/html/images
directory and its files:
find ~/html/images -type d -exec chmod a+rx {} +
find ~/html/images -type f -exec chmod a+r {} +
Warning: These commands will make all affected files readable on the Internet and to other accounts on the system. Take care not to inadvertently expose sensitive information.
It usually not necessary to make the cgi-bin,
wiki or wordpress directories publicly readable, as
CGI/PHP applications are configured to run as the account that owns the files
on SEAS web servers.
