All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server > รวมทุกอย่างเกี่ยวกับ Wordpress การติดตั้ง Plugin ปัญหา แนวทางแก้ไข

สคิป find folder then chmod folder 755 and file 644 in wordpress

(1/1)

golfreeze:
===สคิป find folder then chmod folder 755 and file 644 in wordpress
find /home/wordpress/htdocs \
\( -type f -exec chmod ug+rw,o+r {} \; \) , \
\( -type d -exec chmod ug+rwxs,o+rx {} \; \)

golfreeze:
==== อีกตัวอย่าง จะทำการเปลี่ยน folder หลักและ sub-folder ภายใน folder หลักด้วย =====
find /home/test/public_html/wp-admin -type d -exec chmod 755 {} \;
หรือจะ
cd /home/test/public_html/wp-admin
find . -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):
find /opt/lampp/htdocs -type f -exec chmod 644 {} \;

Some splainin': (thanks @tobbez)

chmod 755 {} specifies the command that will be executed by find for each directory
chmod 644 {} specifies the command that will be executed by find for each file
{} is replaced by the path
; the semicolon tells find that this is the end of the command it's supposed to execute
\; the semicolon is escaped, otherwise it would be interpreted by the shell instead of find

นำร่อง

[0] ดัชนีข้อความ

Go to full version