LinuxQuestions.org
Visit Jeremy's Blog.
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 03-02-2006, 07:00 AM   #16
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45

have you tried chmod +x on the file in question?

Who owns this file?

Code:
ls -l /media/USB/kenneth
(after it is mounted)
 
Old 03-02-2006, 07:08 AM   #17
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
You do know that Flash-media has a relatively short lifetime (a relatively small amount of write operations)?
I read a figure of 100.000 once - maybe more but not much compared to a harddisk...
When you run an application on such media (an exe which creates files...) and there are many such operations you could very fast be at the end of the lifetime of the device - these where originally intended for storage of data to carry it with you, not to be used as a harddisk-replacement.
 
Old 03-02-2006, 08:36 AM   #18
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Rep: Reputation: 146Reputation: 146
Did you check if your usb stick is mounted with the "noexec" option (see my post above)? This makes running executables from there impossible...
 
Old 03-03-2006, 03:55 AM   #19
karpa
LQ Newbie
 
Registered: Feb 2006
Posts: 21

Original Poster
Rep: Reputation: 15
How do I look in the mount options -- to see if the memory stick is mounted with the "noexec" option which will prevent me from executing files from there.

Also I am the owner
-rwxr-xr-x 1 kenneth kenneth 1065740 2005-12-02 04:07 clock

Thanks
 
Old 03-03-2006, 04:30 AM   #20
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
The command you type is simply:
mount
and it shows all mounted filesystems along with where they are mounted and with what options.
If you need to change mount options permanently you:
-unmount the device
-change /etc/fstab -> put in what you want to be different
-mount the device again
 
Old 03-03-2006, 05:01 AM   #21
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Rep: Reputation: 146Reputation: 146
You could also try to unmount and remount it manually. Something like
Code:
umount /dev/sdb1 # change to fit your device node
mount -t ext2 -o rw,suid,dev,exec,async /dev/sdb1 /media/USB/kenneth
See "man mount" for further explanations of the options and be sure the mount point exists when doing this.
 
Old 03-03-2006, 12:14 PM   #22
karpa
LQ Newbie
 
Registered: Feb 2006
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks it finally worked fine.
 
Old 03-12-2006, 07:56 PM   #23
chomprock
LQ Newbie
 
Registered: Dec 2005
Posts: 16

Rep: Reputation: 0
thank you!!! i've been trying to change the permissions on my windows FAT32 partition for about an hour now, and this post was the ticket. i used partition magic to cut my NTFS partition into two and make one a FAT32 for my shared windows/linux junk (works fine, no data loss), and it was a bitch to figure out how to change the permissions. i'll show you what i did, using the exact commands i entered (/dev/hdd5 is my fat partition, and /media/fat is where i mounted it)

to sum up: first, unmount the fat partition with "sudo umount /dev/hdd5". then, edit fstab with "sudo gedit /etc/fstab", adding the line with the umask tag for the fat partition "/dev/hdd5 /media/fat vfat umask=000 00". save and exit. now, mount everything as per the contents of the fstab file with "sudo mount -a". you'll find your unruly fat partition now readable/writable by ALL users.
 
Old 03-13-2006, 03:50 AM   #24
karpa
LQ Newbie
 
Registered: Feb 2006
Posts: 21

Original Poster
Rep: Reputation: 15
Mine works fine. The only thing that every time I reboot or insert USB Media Stick in new pc, it looses some permissions, so i have to enter su:

umount /dev/sda1
mount -t ext2 -o rw,suid,dev,exec,async /dev/sda1 /media/usbdisk

Then all works fine

Can i do something so that it keeps these permission or add those lines somewhere so that when the system boots, it does those 2 line automatically?

Thanks in advance.

Last edited by karpa; 03-13-2006 at 08:41 AM.
 
Old 03-13-2006, 04:19 PM   #25
karpa
LQ Newbie
 
Registered: Feb 2006
Posts: 21

Original Poster
Rep: Reputation: 15
Any one with suggestions?
 
Old 03-13-2006, 04:46 PM   #26
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Quote:
rw,suid,dev,exec,async
put those options into the line for /dev/sda1 in /etc/fstab
 
Old 03-14-2006, 04:33 AM   #27
karpa
LQ Newbie
 
Registered: Feb 2006
Posts: 21

Original Poster
Rep: Reputation: 15
Can you please specify and tell me exactly. You mentioned /etc/fstab. I am still new a newbie. This is what I usually type:

umount /dev/sda1
mount -t ext2 -o rw,suid,dev,exec,async /dev/sda1 /media/usbdisk

Last edited by karpa; 03-14-2006 at 04:34 AM.
 
Old 03-14-2006, 04:53 AM   #28
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
/etc/fstab is the file which describes which device should be mounted to which directory and with what options.
Editit with any editor you like.
a sample from mine:
Code:
#/dev/sda1     /mnt/usb        vfat    noauto,users    0 0
I have commented this out now (#), because my USB-stuff gets automounted in Gnome - just an example
first is the device - then the mount-point - then the filesystem-type - then the mount-options - read about the numbers at the end and a more comprehensive explanation in:
Code:
man fstab
Your line would look like:
Code:
/dev/sda1     /media/usbdisk       ext2  users,rw,suid,dev,exec,async   0 0
the "users" is there so everyone can mount and unmount it
 
Old 03-15-2006, 02:00 PM   #29
chomprock
LQ Newbie
 
Registered: Dec 2005
Posts: 16

Rep: Reputation: 0
go to the ubuntu wiki if you're confused and search for "permissions". i put a section at the bottom of that page for changing permissions for FAT partitions in the /etc/fstab file. it should work with all volumes.
 
Old 03-15-2006, 05:20 PM   #30
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
In short, if you don't add an entry to the fstab file, when your system re-boots, it will not get mounted, ie you'll have to manually re-type that line every time.
 
  


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
change permission alma Linux - Newbie 5 10-28-2005 10:17 PM
how to change the file permission ?? AK prince Slackware 17 08-05-2005 12:16 PM
Why I cannot change permission on /etc/sudoers? mikeshn Linux - Software 1 01-06-2005 11:26 AM
chmod permission change? tidasu Linux - Newbie 7 08-30-2004 06:02 PM
How do I change permission many at a time? akihandyman Mandriva 1 08-26-2004 10:40 PM

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

All times are GMT -5. The time now is 01:26 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