question2:as to the filefolders, wordpress know their structure. so, we need not set r permission to any filefolder?
Its been a while since I have had anything to do with wordpress but since your a nice girl I will try to help you out:
Wordpress Linux file permissions and group
this has a tidy shell script to define correct permissions.
generally everything WWW has to have read permission otherwise its not readable.
Again apache should be fine since the underlying process running the virtual site for a user should be apache - unless you are running some form of strange apache config where the apache user becomes real user for a virtual host (never seen nothing like it - unless we are talking IBM http server or something). So by giving apache user the correct permisions should work.
suppose i am a website viewer,how can i write a file in those folder with file owner is nobody?
This would be actually apache user, me visiting your site hitting your page would trigger apache to server that page and the unerlying user serving that page would be that apache user if it happens to be nobody:nogroup then thats who needs the relevant permissions to write to the folder.
so if you have /var/www/html and it is owned by root and your apache process is running as nobody then nobody can not write into root owned folder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.