LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 03-29-2015, 11:48 AM   #1
BrajZore
Member
 
Registered: Sep 2007
Location: Växjö
Distribution: Slackware
Posts: 50

Rep: Reputation: 15
File permissions on file


Im trying to execute a shellscript:

PHP Code:
#!/bin/sh
set -e

echo VMware Unlocker 1.2.0
echo ===============================
echo 
CopyrightDave Parsons 2011-13

# Ensure we only use unmodified commands
export PATH=/bin:/sbin:/usr/bin:/usr/sbin

# Select correct patcher
echo Patching...
ARCH=`uname -m`
if [ 
"$ARCH'x86_64' ]; then
    
./Unlocker.Linux64
else
    ./
Unlocker.Linux32
fi

# Copy darwin.iso to tools folder[PHP] 
cp -v ../Tools/darwin.iso /usr/lib/vmware/isoimages
cp -v ../Tools/darwin.iso.sig /usr/lib/vmware/isoimages

echo Finished![/PHP]

When I try to execute it, it keeps saying:
PHP Code:
CopyrightDave Parsons 2011-13
Patching
...
install.sh15install.sh: ./Unlocker.Linux64Permission denied 
I have tried to set the permissions with both chown -R and chmod 775, but the permissions doesn't change. Anyone who can help me?

PHP Code:
drwx------ 1 bryan bryan     384 mar 29 17:44 .
drwx------ 1 bryan bryan     432 mar 29 17:18 ..
-
rw------- 1 bryan bryan     508 mar 29 17:44 install.sh
-rw------- 1 bryan bryan     498 sep 19  2013 uninstall.sh
-rw------- 1 bryan bryan 1274692 sep 19  2013 Unlocker.Linux32
-rw------- 1 bryan bryan 1343792 sep 19  2013 Unlocker.Linux64 
I have also tried chmod +x Unlocker.Linux32 Unlocker.Linux64, but the permissions don't apply.
 
Old 03-29-2015, 12:09 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Did you try running:

Code:
sudo chmod +x Unlocker.Linux32
 
Old 03-29-2015, 01:01 PM   #3
BrajZore
Member
 
Registered: Sep 2007
Location: Växjö
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by T3RM1NVT0R View Post
Did you try running:

Code:
sudo chmod +x Unlocker.Linux32
Yes, but It don't work. It seems like the permissions don't apply.
 
Old 03-29-2015, 01:23 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Wait a sec is that the iso image in which you are trying to change the permission. What pwd (present working directory) says. I hope you have extracted the contents of iso to some other location and then changing the permission not on the iso image itself (ofcourse by mistake).
 
Old 03-29-2015, 01:34 PM   #5
BrajZore
Member
 
Registered: Sep 2007
Location: Växjö
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by T3RM1NVT0R View Post
Wait a sec is that the iso image in which you are trying to change the permission. What pwd (present working directory) says. I hope you have extracted the contents of iso to some other location and then changing the permission not on the iso image itself (ofcourse by mistake).
What do you mean?

Im trying to run a shellscript that is located at my harddrive?

It's seems like I can't change the permissons on the files that is located at my mounted harddrive.

If I drag the folder from my mounted hardrive, to my Desktop, the Permission works fine.

Last edited by BrajZore; 03-29-2015 at 01:41 PM.
 
Old 03-29-2015, 01:58 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Ah, is that hard drive format NTFS because if that is the case then the permission wouldn't work. Also check the output of mount -a command and paste the output here.
 
Old 03-29-2015, 01:59 PM   #7
BrajZore
Member
 
Registered: Sep 2007
Location: Växjö
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by T3RM1NVT0R View Post
Ah, is that hard drive format NTFS because if that is the case then the permission wouldn't work. Also check the output of mount -a command and paste the output here.
Yes, It was NTFS that was the problem. I solved it by adding this to my fstab:

# change the "UUID" to your partition UUID
UUID=12102C02102CEB83 /media/windows ntfs-3g auto,users,permissions 0 0
 
Old 03-29-2015, 02:01 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Good to hear that and thanks for sharing it. Please mark the thread as solved.

Enjoy Linux!!!
 
Old 03-29-2015, 02:04 PM   #9
BrajZore
Member
 
Registered: Sep 2007
Location: Växjö
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by T3RM1NVT0R View Post
Good to hear that and thanks for sharing it. Please mark the thread as solved.

Enjoy Linux!!!
It was not that easy :P. It still complains that I don't have permission to execute Unlocker.Linux64

But the perimssions seems to be fine?

PHP Code:
drwxrwxrwx 1 bryan root     4096 maj 24  2012 .
drwxrwxrwx 1 bryan root     4096 maj 24  2012 ..
-
rwxrwxrwx 1 bryan bryan     508 okt  5  2013 install.sh
-rwxrwxrwx 1 bryan root      498 sep 19  2013 uninstall.sh
-rwxrwxrwx 1 bryan root  1274692 sep 19  2013 Unlocker.Linux32
-rwxrwxrwx 1 bryan bryan 1343792 sep 19  2013 Unlocker.Linux64 
 
Old 03-29-2015, 02:07 PM   #10
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
This should answer your query: http://askubuntu.com/questions/49392...external-drive
 
Old 03-29-2015, 02:32 PM   #11
BrajZore
Member
 
Registered: Sep 2007
Location: Växjö
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by T3RM1NVT0R View Post
No. All my files has the permissions:
PHP Code:
drwxrwxrwx 1 bryan root     4096 mar 29 21:30 .
drwxrwxrwx 1 bryan root     4096 maj 24  2012 ..
-
rwxrwxrwx 1 bryan bryan     508 mar 29 21:30 install.sh
-rwxrwxrwx 1 bryan root      498 sep 19  2013 uninstall.sh
-rwxrwxrwx 1 bryan root  1274692 sep 19  2013 Unlocker.Linux32
-rwxrwxrwx 1 bryan bryan 1343792 sep 19  2013 Unlocker.Linux64 
BUt it still says: install.sh: 15: install.sh: ./Unlocker.Linux64: Permission denied
 
Old 03-29-2015, 02:42 PM   #12
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
That was not my point, my point was if file system is not mounted with support for execute permission then though your files have execute permission it will simply deny/reject that.

Have a look at this: http://unix.stackexchange.com/questi...ntfs-partition

The above link has got screenshot and you can even play around a bit yourself.
 
  


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
Distribute a file with file permissions/modes over the web swtdrgn Linux - Software 10 09-19-2013 08:12 PM
chmod: changing permissions of `/usr../bin': Read-only file File System Issue cdhar Linux - Newbie 3 12-31-2012 06:17 AM
SMB - File copy from Windows file permissions changed? tiger.woods Red Hat 1 12-04-2012 06:18 AM
Windows file permissions with a Linux file server joseph_k Linux - Server 3 05-09-2008 12:54 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 12:30 PM.

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