求助关于 bash:/root/etc bash.bashrcc:Permission denied

.bashrc: Permission denied
Share This Thread 
Subscribe to this Thread 
Contributing User
Devshed Novice (500 - 999 posts)
.bashrc: Permission denied
After making myself root with &su -& I issue another command, &su svenetto& to become the user svenetto and I get the following error:
bash: /home/igpro/004/VENETT/.bashrc: Permission denied
The svenetto's home is /home/igpro/VENETT
Also, as the user svenetto, if I try to go to him home by issuing the command &cd& I receive the same error.
Any ideas?
I changed the user's shell to /bin/sh and this allows me to log in. After I log in Issue the command &cd& and I receieve:
sh: cd: /home/igpro/004/VENETT: Not a directory
If I issue: ls -ld at the home directory I get:
drwxrws--- 3 svenetto svenetto 4096 Jan 12 10:19 /home/igpro/004/VENETT
Las January 12th, 2007 at .
Contributing User
Devshed Novice (500 - 999 posts)
Maybe you should try issuing &su - svenetto&
instead to set svenetto's correct environment.
PS: Notice the dash (-) in the command.
Contributing User
Devshed Novice (500 - 999 posts)
I get the same error:
su&-&svenetto
su:&warning:&cannot&change&directory&to&/home/igpro/004/VENETT:&Permission&denied
-bash:&/home/igpro/004/VENETT/.bash_profile:&Permission&denied&
Something makes it think that the directory structure is NOT normal.
Contributing User
Devshed Novice (500 - 999 posts)
After searching I got a few hints about executable, permissions, and folders. So, I looked at the /home folder and it was 770 and it needed to be 775. The owner and the groupp must have write access.
At any rate, this was an interesting problem and I hope someone else can benefit from my reply.
Thanks for listening.
Comments on this post
Share This Thread 
Subscribe to this Thread 新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
白手起家, 积分 193, 距离下一级还需 7 积分
论坛徽章:0
一台比较老的系统,记不得是啥版本的了,反正是2.4的内核。上面跑的服务更老,上面有10多年前一个老大搞的计数器,cgi的,看了一下可能也没有源代码(几年前迁移机器是直接把二进制文件copy过去的,apache还是1.3的)。想把web服务从apache换成nginx的,图个内存占用小一些,于是上nginx网站找了个CGI到FastCGI的封装。
没有直接在在用的服务器上试,先在虚拟机上搭了环境跑了一下看是正常的,然后再到那台机器上做,运行这个脚本的时候报了个错:bash: /root/.bashrc: Permission denied
出错的命令如下:
su -c '/usr/local/nginx/cgi.pl && /usr/local/nginx/logs/cgi.log 2&&1 &' -s '/bin/bash' www
其中www用户是运行web服务的用户,shell是/sbin/nologin,没有home目录。
请教linux达人,这个报错是啥意思啊,我个人觉得不该出现权限的问题啊。脚本和涉及到的目录都是www的。
事先实验用的虚拟机是centos4.6,比在跑的那个新。
[ 本帖最后由 minuteman 于
08:59 编辑 ]
&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp
白手起家, 积分 26, 距离下一级还需 174 积分
论坛徽章:0
可否把这语句的前后几句贴出来,,
单纯这句应该没错啊
不会去执行/root/.bashrc的
或者你直接在命令行下执行下这句,看有没有错。
[ 本帖最后由 huabo2008 于
09:40 编辑 ]
白手起家, 积分 193, 距离下一级还需 7 积分
论坛徽章:0
就是单句执行的时候有这个错,还真就是在命令行上执行的,所以很奇怪,都怀疑那旧系统是不是被人下了药了。
[root@server2 nginx]# su -c '/usr/local/nginx/cgi.pl && /usr/local/nginx/logs/cgi.log 2&&1 &' -s '/bin/bash' nobody
bash: /root/.bashrc: Permission denied
[root@server2 nginx]#
[ 本帖最后由 minuteman 于
12:18 编辑 ]
论坛徽章:0
ls -l /root/.bashrc
把结果贴出来
家境小康, 积分 1003, 距离下一级还需 997 积分
论坛徽章:0
如果是bash,每开启一个子shell,都会执行一次~/.bashrc
稍有积蓄, 积分 438, 距离下一级还需 62 积分
论坛徽章:0
su -c '/usr/local/nginx/cgi.pl && /usr/local/nginx/logs/cgi.log 2&&1 &' -s '/bin/bash' nobodyy
写成下面这样
su -c '/usr/local/nginx/cgi.pl && /usr/local/nginx/logs/cgi.log 2&&1 &' -s '/bin/bash' - nobody
白手起家, 积分 193, 距离下一级还需 7 积分
论坛徽章:0
多谢,呵呵
家境小康, 积分 1259, 距离下一级还需 741 积分
论坛徽章:0
前几天刚好遇到过
看看su有没有s位?若没有
chmod +s /bin/bash后OK!
[ 本帖最后由 gyp334a 于
11:24 编辑 ]查看: 444|回复: 3
新手学习,求助关于execle error: Permission denied的问题
级别 {/authortitle}
一个简单的学习程序,运行的时候出现了错误,上网没查到解决办法,求大神指点一下
post_newreply
级别 {/authortitle}
你发环境是& && &&&图形界面是没有超级权限的&&? 你的编译目录是?
级别 {/authortitle}
1、/home/sz目录权限,
2、/home/sz/sample3 执行权限。
权限问题,执行权限,目录访问权限等,用sudo chmod 改变其权限
分享到微信
打开微信,点击顶部的“╋”,
使用“扫一扫”将网页分享至微信。
请将我们加入您的广告过滤器的白名单,请支持开源站点。谢谢您。db:: 4.05::bash: /home/oracle/.bashrc: Permission denied 3k
Widget settings form goes here

我要回帖

更多关于 bash.bashrc源文件 的文章

 

随机推荐