LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't change permissions (https://www.linuxquestions.org/questions/linux-newbie-8/cant-change-permissions-903834/)

manox 09-19-2011 08:28 AM

can't change permissions
 
I'm just trying to run this script and can't add execute permission to execute in
Quote:

[root@vostro raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# ls -l
total 463352
-rw-------. 1 manox manox 1321 May 5 12:07 LICENSE
-rw-------. 1 manox manox 1980 May 5 12:07 README
-rw-------. 1 manox manox 702 May 5 12:07 start-VMware-console.sh
-rw-------. 1 manox manox 1111 May 5 12:07 vmware-config.patch
-rw-------. 1 manox manox 22247 May 5 12:07 vmware-server-2.0.2-203138-update.patch
-rw-------. 1 manox manox 474415801 Sep 7 21:20 VMware-server-2.0.2-203138.x86_64.tar.gz
-rw-------. 1 manox manox 11175 May 5 12:07 vmware-server-2.0.x-kernel-2.6.3x-install.sh
[root@vostro raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# ls -l
total 463352
-rw-------. 1 manox manox 1321 May 5 12:07 LICENSE
-rw-------. 1 manox manox 1980 May 5 12:07 README
-rw-------. 1 manox manox 702 May 5 12:07 start-VMware-console.sh
-rw-------. 1 manox manox 1111 May 5 12:07 vmware-config.patch
-rw-------. 1 manox manox 22247 May 5 12:07 vmware-server-2.0.2-203138-update.patch
-rw-------. 1 manox manox 474415801 Sep 7 21:20 VMware-server-2.0.2-203138.x86_64.tar.gz
-rw-------. 1 manox manox 11175 May 5 12:07 vmware-server-2.0.x-kernel-2.6.3x-install.sh
[root@vostro raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# chmod 777 vmware-server-2.0.x-kernel-2.6.3x-install.sh
[root@vostro raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# ls -l
total 463352
-rw-------. 1 manox manox 1321 May 5 12:07 LICENSE
-rw-------. 1 manox manox 1980 May 5 12:07 README
-rw-------. 1 manox manox 702 May 5 12:07 start-VMware-console.sh
-rw-------. 1 manox manox 1111 May 5 12:07 vmware-config.patch
-rw-------. 1 manox manox 22247 May 5 12:07 vmware-server-2.0.2-203138-update.patch
-rw-------. 1 manox manox 474415801 Sep 7 21:20 VMware-server-2.0.2-203138.x86_64.tar.gz
-rw-------. 1 manox manox 11175 May 5 12:07 vmware-server-2.0.x-kernel-2.6.3x-install.sh

sasuke 09-19-2011 08:33 AM

you can be the root and then use the chmod command to make the script executable..

Simon Bridge 09-19-2011 08:41 AM

That may happen if the file system does not support permissions.... like fat32 or ntfs.
When chmod cannot modify the mode, and the fs supports this, then it usually returns an error message. So it is odd that you don't get one.

@sasuke - his prompt says he is root. If the failure was due to not being root, then the error message would say this. There is no error message.

sasuke 09-19-2011 08:55 AM

@ Simon Bridge then how to make this script executable?? is there any other option to change the permission??

Wim Sturkenboom 09-19-2011 10:02 AM

Just copy it to somewhere where you can set those permissions ;)

samtoddler 09-19-2011 10:21 AM

Hi,

Why dont you try like this

Code:

bash <script_filename>
this can also help.Once someone mess with my ntfs partition by changing permission then some scripts in my linux machine
does not work same method works for me. Hope you will find it useful.

samtoddler

linux2001 09-19-2011 10:28 AM

Do
Code:

#chmod +x yourscript
java socket

manox 09-19-2011 02:23 PM

I have moved that files from NTFS to Linux partition and worked thanks

Simon Bridge 09-20-2011 11:39 AM

For the future, if you want to be able to execute files in a fs that does not support unix permissions, you can set a permissive umask when you mount the partition. See the man pages for fstab and mount.

frankbell 09-20-2011 09:21 PM

You might also try running the script like this:

Code:

sh [scriptname]


All times are GMT -5. The time now is 09:48 PM.