Confirming correct filesystem permissions

Every file on a Unix-based filesystem has three levels of access permission—read, write, and execute. These permissions are assigned to three separate entities—the owner, a user group, and the world. Best practice dictates that these permissions be set as low (restrictive) as possible (that is, unless you really NEED world-writeable files, don't set them that way!).

It's important to ensure that the filesystem permissions for all of the phpList's files are correct. If the permissions are too restrictive, the web server won't be able to display the phpList interface at all. If they are too loose, you risk unauthorized users editing or deleting your files.

If you unpacked phpList onto your web host directly from the source tar.gz file, then the permissions will be correctly set. However, if you transferred the files from another host using FTP, it's possible that the permissions will have been reset. Regardless, it's advisable to inspect these.

Confirming permissions in a GUI SFTP/FTP client

Most users will interact with their web host via a GUI SFTP/FTP client. Your client will generally show you the permissions on each file using the drwxrwxrwx syntax or in numeric shorthand called "octal notation":

Confirming permissions in a GUI SFTP/FTP client

Confirming permissions using a shell session

The same information can be displayed if you have a shell on the web server host using the ls -l command:

[root@myhost public_html]# ls -l
total 88
drwxr-xr-x 15 root root 4096 Oct 22 14:57 admin
drwxr-xr-x 2 root root 4096 Oct 22 12:36 config
-rw-r--r-- 1 root root 2283 May 6 2009 dl.php
drwxr-xr-x 3 root root 4096 Apr 24 03:05 images
-rw-r--r-- 1 root root 698 Apr 15 2004 index.html
-rw-r--r-- 1 root root 35860 Sep 25 15:18 index.php
drwxr-xr-x 2 root root 4096 Apr 24 03:05 js
drwxr-xr-x 2 root root 4096 Sep 25 10:35 lists
-rw-r--r-- 1 root root 3873 May 6 2009 lt.php
drwxr-xr-x 2 root root 4096 Apr 24 03:05 styles
-rw-r--r-- 1 root root 1683 Sep 25 14:33 test.html
-rw-r--r-- 1 root root 318 Sep 25 13:25 test.php
drwxr-xr-x 2 root root 4096 Apr 24 03:05 texts
-rw-r--r-- 1 root root 1847 May 6 2009 ut.php
[root@myhost public_html]#

Setting appropriate permissions

Ensure that all directories are set to rwxr-xr-x or 755 (read, write, and execute access for the owner, read and execute for the group and world) and that all files are set to rw-r--r--, or 644 (read and write access for the owner, read access for the group and world).

On a Unix shell, you do this using the chmod command. That is, to change the permissions on a file to 644, you'll run chmod 644 filename.

In your GUI client, there's likely a context menu item to set permissions on a selection of files:

Setting appropriate permissionscorrect filesystem permissionsshell session, using
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.116.51