Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-16-2010, 03:04 PM   #1
LQ Newbie
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
Unable to change file permissions to execute

Hi folks,

I've checked out a subversion project with source c++ files in netbeans 6.8 on Red Hat 5.5. My machine has a dual boot with windows xp and RHEL 5.5 so I checked out the project on a folder called winshare which is a shared drive/partition (E: under xp) allowing both operating systems to access the contents. I've Fedora as virtual machine on xp and wanted to be able to work on the source seamlessly whether using fedora or RHEL.

Problem is that Netbeans is able to build the source just fine but I can't seem to run the generated executable. It has -rw-rw---- permission and the owner is the same user logged in (let's say user1) but no matter what I do, whether I change permissions as user1 or root issuing command chmod 777 -R /dir/where/file/is does not have any effect whatsoever on the executable as well as any .cpp or .h files (nothing that I need exectue permissions on .cpp but just to make a point).

Anyone knows what seems to be the problem? Thanks in advance!
Old 06-16-2010, 03:57 PM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
You can't change permissions on a file that's on a windows drive. Windows doesn't support linux permissions. (or anything other than windows, let's face it)

You could try this approach :

Last edited by smoker; 06-16-2010 at 03:59 PM.
Old 06-17-2010, 10:47 AM   #3
LQ Newbie
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks smoker. That put me to right direction although the solution suggested didn't work as it is. What worked for me was adding this line to /etc/fstab file:

/dev/sda3 /winshare vfat rw,auto,uid=myuser,gid=mygroup,exec 0 0

where myuser is the user on the system belonging to mygroup group and wants to be able to mount the drive as read/write/execute.

What I learned was that you can't change the permissions once it's have to mount it with certain permission and those permission persist.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to execute gcc: No such file or directory lies Linux - Kernel 10 06-26-2008 02:06 PM
File Permissions - Execute Not Read baddah Linux - Newbie 3 05-23-2007 04:08 PM
cannot execute binary file, though ownership and permissions are set correctly :( rahmmandel Linux - Software 6 01-11-2007 09:45 AM
Who can tell me why I am unable to execute bin file under RHEL AS 4? memorinex2005 Red Hat 7 03-10-2005 09:10 AM
unable to change file permissions!! dcdbutler Linux - General 11 02-06-2005 10:58 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:03 AM.

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