mac和linux下软链接权限的不同

此文只当是一个mark吧

在mac和linux上软链接的使用基本是相同的,有一点不同的在权限方面:

1 linux的软链文件不能修改权限

详见man chmod :

chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals.

2 mac的软链文件可以用chmod设置权限  chmod -h 777 ./symlink

详见man chmod :

-h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to.


( ! ) Warning: Missing argument 1 for cwppos_show_review(), called in /data/www/enjoyphp/wp-content/themes/flat/content-single.php on line 29 and defined in /data/www/enjoyphp/wp-content/plugins/wp-product-review/includes/legacy.php on line 18
Call Stack
#TimeMemoryFunctionLocation
10.0000355416{main}( ).../index.php:0
20.0001355704require( '/data/www/enjoyphp/wp-blog-header.php' ).../index.php:17
30.169710154056require_once( '/data/www/enjoyphp/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.170910225200include( '/data/www/enjoyphp/wp-content/themes/flat/single.php' ).../template-loader.php:74
50.253610781440get_template_part( ).../single.php:5
60.253610781960locate_template( ).../general-template.php:167
70.253710782056load_template( ).../template.php:643
80.253710782440require( '/data/www/enjoyphp/wp-content/themes/flat/content-single.php' ).../template.php:686
90.258510767256cwppos_show_review( ).../content-single.php:29

发表评论

电子邮件地址不会被公开。 必填项已用*标注