Solved

Linux: Cannot read from exe files on a Cdrom (with wine or cat)

Posted on 2010-08-12
6
641 Views
Last Modified: 2013-12-16
Using Fedora 13, Fresh install, wine 1.2
The cdrom mounts, users can read the directory, but cant read from .exe files or execute them. I think SELinux may play a role here in preventing users from executing or reading executables, but thats just a theory.

Here is output of
#ls -lh /media/cdrom
total 457M
-rw-r--r--. 1  502 games   48 Jun 23  2008 autorun.inf
dr-xr-xr-x. 1 root root  2.0K Jun 23  2008 directx
-rw-r--r--. 1  502 games  54K Jun 23  2008 disc.ico
-rwx------. 1  502 games 1.2M Jun 23  2008 installer.exe
-rwx------. 1  502 games 456M Jun 23  2008 installer tome.mpq

Open in new window

Here is my /etc/fstab:
/dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0
# ONLY RELEVANT LINE /\ ******
/dev/mapper/vg_robx11-lv_root /                       ext4    defaults        1 1
UUID=47752c53-cbe7-4494-9497-eb378a73e8c7 /boot                   ext4    defaults        1 2
/dev/mapper/vg_robx11-lv_home /home                   ext4    defaults        1 2
/dev/mapper/vg_robx11-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

Open in new window


Note: i tried using umask=000 with /dev/cdrom in fstab and the raw mount command.
0
Comment
Question by:themrrobert
6 Comments
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 33424715
Hi,


Just check the contents of your /var/log/audit/audit.log or your /var/log/messages. If you see any AVC messages in it after you run .exe then this is an SELinux otherwise it is not.

Cheers,
K.
0
 
LVL 13

Author Comment

by:themrrobert
ID: 33424879
It doesn't seem to be SELinux. The problem isn't that it won't allocate memory space, it's that it won't allow me to mount the cd with executable files readable / executable to users. (see original post above)
0
 
LVL 3

Assisted Solution

by:berniep
berniep earned 200 total points
ID: 33426150
the file permissions of installer.exe show that only user "502" has rwx - could this be the problem?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Expert Comment

by:nevvamind
ID: 33427454
try "setenforce 0" on command line.
Alternatively, edit the /etc/sysconfig/selinux file and set "SELINUX=disabled" and reboot the machine
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 100 total points
ID: 33509751
Hi,

If it is not about SELinux it mustbe something about file permissions. User can change to directories because permssiosn about the directory is:

dr-xr-xr-x. 1 root root  2.0K Jun 23  2008 directx

So that any one can change into them.

They can read ordinary files too:

-rw-r--r--. 1  502 games  54K Jun 23  2008 disc.ico

Because you have read permission for others.

But when it comes to exe files:

-rwx------. 1  502 games 1.2M Jun 23  2008 installer.exe

The file belongs to a user id 502 which is unknown over your system (hence it displays only the numeric id). Furthermore only thi non existing users have read and execute pemission over the .exe file.

So it is obvious that nobody could read or execute the exe. For people to be able to rad ans execute you'll need :

chmod 755 installer.exe

Before you burn the cd.

Best Regards,

K.
0
 
LVL 19

Accepted Solution

by:
simon3270 earned 200 total points
ID: 34735972
If you can't alter the stored permissions, then you could try creating a user with the UID 502, and allow your other users to run commands as that user, using sudo.





0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now