LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Unable to change file permissions to execute (https://www.linuxquestions.org/questions/linux-general-1/unable-to-change-file-permissions-to-execute-814567/)

azm882 06-16-2010 02:04 PM

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!

smoker 06-16-2010 02:57 PM

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 :
http://ubuntuforums.org/showpost.php...51&postcount=2

azm882 06-17-2010 09:47 AM

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 mounted...you have to mount it with certain permission and those permission persist.


All times are GMT -5. The time now is 01:33 AM.