LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2011, 08:28 AM   #1
manox
Member
 
Registered: Sep 2011
Posts: 31

Rep: Reputation: Disabled
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
 
Old 09-19-2011, 08:33 AM   #2
sasuke
LQ Newbie
 
Registered: Sep 2011
Location: Durgapur
Distribution: Red hat
Posts: 17

Rep: Reputation: Disabled
you can be the root and then use the chmod command to make the script executable..
 
Old 09-19-2011, 08:41 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.

Last edited by Simon Bridge; 09-19-2011 at 08:44 AM.
 
1 members found this post helpful.
Old 09-19-2011, 08:55 AM   #4
sasuke
LQ Newbie
 
Registered: Sep 2011
Location: Durgapur
Distribution: Red hat
Posts: 17

Rep: Reputation: Disabled
@ Simon Bridge then how to make this script executable?? is there any other option to change the permission??
 
Old 09-19-2011, 10:02 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Just copy it to somewhere where you can set those permissions
 
Old 09-19-2011, 10:21 AM   #6
samtoddler
Member
 
Registered: Jul 2011
Location: Delhi
Distribution: Cent OS/RHEL
Posts: 37

Rep: Reputation: Disabled
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
 
Old 09-19-2011, 10:28 AM   #7
linux2001
Member
 
Registered: Sep 2011
Posts: 32

Rep: Reputation: Disabled
Do
Code:
#chmod +x yourscript
java socket

Last edited by linux2001; 01-26-2012 at 07:31 AM.
 
Old 09-19-2011, 02:23 PM   #8
manox
Member
 
Registered: Sep 2011
Posts: 31

Original Poster
Rep: Reputation: Disabled
I have moved that files from NTFS to Linux partition and worked thanks
 
Old 09-20-2011, 11:39 AM   #9
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 09-20-2011, 09:21 PM   #10
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
You might also try running the script like this:

Code:
sh [scriptname]
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can I change file permissions in windows ntfs partition.Even root can't change it e3399 Linux - Newbie 3 03-02-2011 10:54 PM
[SOLVED] filesystem permissions question - making so user can't change permissions? c0pe Linux - Security 4 07-12-2010 09:06 AM
Cannot change permissions mlun Linux - Newbie 1 11-12-2009 05:41 PM
How to change permissions... mitchell7man Linux - General 6 05-31-2007 01:17 PM
How to change permissions? SonoranFun Linux - Newbie 4 11-02-2004 10:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration