分页: 1 / 1

bash: ./hello: 权限不够

发表于 : 2011-03-18 21:09
晓~~
请教各位大侠:

最简单的helloworld的程序
但是提示bash: ./hello: 权限不够!!!
求教~~

Re: bash: ./hello: 权限不够

发表于 : 2011-03-18 21:38
飞火流星
不就是运行个程序么?权限不够就加sudo

Re: bash: ./hello: 权限不够

发表于 : 2011-03-18 21:40
flac

chmod +x hello

Re: bash: ./hello: 权限不够

发表于 : 2011-03-18 22:08
zhw2101024
如果你安装之后没有改root账户密码,直接进入桌面,那就是权限问题了,试试sudo ./hello。现在的ubuntu版本要改root密码才能进入root,那样不加sudo也不会报错了。sudo可以暂时给普通用户一部分管理员的权限,用来安装软件什么的,需要输入当前用户的密码。建议看看论坛里的新手帖,有事没事多Google。

Re: bash: ./hello: 权限不够

发表于 : 2011-03-18 22:23
HelloAndroid
chmod u+x helloworld

Re: bash: ./hello: 权限不够

发表于 : 2011-03-27 11:40
wxd2000
chmod 777 helloworld
due to you are in usr mod , so this chmod order can change the file attribute to rwx
rwx rwx rwx = 111 111 111
rw- rw- rw- = 110 110 110
rwx --- --- = 111 000 000

and so on...

rwx = 111 in binary = 7
rw- = 110 in binary = 6
r-x = 101 in binary = 5
r-- = 100 in binary = 4

Re: bash: ./hello: 权限不够

发表于 : 2011-03-27 12:04
tenzu
又是权限。。。

Re: bash: ./hello: 权限不够

发表于 : 2011-04-18 21:32
zhonghp
还是权限不够啊。。。求解释

Re: bash: ./hello: 权限不够

发表于 : 2011-04-18 22:16
lilydjwg
是不是文件格式不对?file 它看看输出。

Re: bash: ./hello: 权限不够

发表于 : 2011-04-19 22:37
arthurchen
maybe due to some extended ext filesytem attributes, you'd better check the file properties

Re: bash: ./hello: 权限不够

发表于 : 2011-04-30 19:35
pangding
我觉得就是加个
chmod +x hello
的事

Re: bash: ./hello: 权限不够

发表于 : 2011-05-02 21:26
alan8410
谁都知道权限不够时加 sudo, 或chmod

但这次不一样,试试 :
~ bash hello.sh

就是在ubuntu下脚本不能直接执行,要加 bash *.sh