cd dir 显示permission denied

1.cd dir/ 提示无权限

sudo cd dir/ 提示不可以command not found

解决:

:> sudo su

:> cd  dir/

 

2.php.ini加入open_basedir导致访问文件夹受限,弹出错误:

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/base) is not within the allowed path(s): 

解决办法是根据phpinfo();来查出Loaded Configuration File(php.ini的位置),然后把php.ini中的open_base_dir注释掉(加;)或都再加上要求访问的目录.

 

 

open_basedir可将用户访问文件的活动范围限制在指定的区域,通常是其家目录的路径,也
可用符号”.”来代表当前目录。注意用open_basedir指定的限制实际上是前缀,而不是目录名。
举例来说: 若”open_basedir = /dir/user”, 那么目录 “/dir/user” 和 “/dir/user1″都是
可以访问的。所以如果要将访问限制在仅为指定的目录,请用斜线结束路径名。例如设置成:
“open_basedir = /dir/user/”

 

参考:

1.http://ubuntuforums.org/showthread.php?t=319229

2.https://help.ubuntu.com/community/RootSudo

3.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值