紫雨的能量运动

Law of Attraction ~ One Law And Rules Them All !

Changing File Permission by FTP 4月 21, 2006

Filed under: Wordpress & Blog — PurpleRain @ 12:55 上午

On computer filesystems, different files and directories have permissions that specify who and what can edit and read them. This is important because WordPress may need access to write to files in your wp-content directory to enable certain functions.

Here is one possible permission scheme.

All files should be owned by your user account, and should be writable by you. Any file that needs write access from WordPress should be group-owned by the user account used by the webserver.

  • / – The root WordPress directory: all files should be writable only by your user account
    • EXCEPT .htaccess if you want WordPress to automatically generate rewrite rules for you
  • /wp-admin/ – the WordPress administration area: all files should be writable only by your user account.
  • /wp-includes/ – the bulk of WordPress application logic: all files should be writable only by your user account.
  • /wp-images/ – image files used by WordPress: all files should be writable only by your user account.
  • /wp-content/ – variable user-supplied content
    • /wp-content/themes/ – theme files. If you want to use the built-in theme editor, all files need to be group writable. If you do not want to use the built-in theme editor, all files can be writable only by your user account
    • /wp-content/plugins/ – plugin files: all files should be writable only by your user account.
    • other directories under /wp-content/ should be documented by whatever plugin / theme requires them. Permissions will vary.
    • The WordPress Database Backup Plugin requires the /wp-content/ folder be made writeable. In some cases, this may require assigning 755 permissions or higher (e.g. 777 on some hosts).

Also see the discussion in this Forum thread (http://wordpress.org/support/topic/50863|Support).

 

留下评论