PDA

View Full Version : Changing permissions for a folder



tech291083
25th December 2008, 08:54 AM
Hi,

I have folder on the desktop of my Fedora machine called 'PracShellScript' which has some shell script in it. I want to assign read, write and execute permissions to all owner, group and users of this folder. So I did the following at a command prompt.


[root@localhost ~]# cd Desktop
[root@localhost Desktop]# chmod -rwxrwxrwx PracShellScript
chmod: PracShellScript: new permissions are -------w-, not ---------
[root@localhost Desktop]#
[root@localhost Desktop]#
[root@localhost Desktop]# cd PracS*
[root@localhost PracShellScript]# ./exp2.sh
bash: ./exp2.sh: Permission denied

but I am not able to compile/run the scripts with .sh extension in the folder. I am the root user as well. Please help me. Thanks..

Anniedog
25th December 2008, 09:36 AM
I think you need to set the reccursive execute permissions you have just set the ownership only of the directory. If you are in the Desktop easiest way is to right click on the script to get properties and then click the permissions tab and check the execute box ( that is with gnome), in terminal you will need to use chmod command. see the executable file on my box below

-rwxrwxr-x 1 martin martin 963 2008-12-23 14:46 /home/martin/Desktop/Java/CloneTest.class

check out the script with $ ls -l "script" to see what you have for the actual file.

Nokia
25th December 2008, 10:40 AM
Try
chmod 777 PracShellScript

tech291083
21st February 2009, 07:37 AM
Try
chmod 777 PracShellScript

Thanks a lot.............