FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-16-2010, 12:35 AM
Manon Metten
 
Default Can not set execute permission to file in usb storage media with fat32 format

> I want to execute some script file in usb storage media with fat32 format,
> but I can not set execute permission to them with "chown +x". What shall I
> do?

I don't think "chown +x" is possible on an alien FS.
On my usb stick with FAT32, all files look like they're executables.

You might simply use:

$ . ./script_file

Manon.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTimxSFkTikgoMMizUbZ25+Wkmdqiv1g1nA1EwopS@mail .gmail.com">http://lists.debian.org/AANLkTimxSFkTikgoMMizUbZ25+Wkmdqiv1g1nA1EwopS@mail .gmail.com
 
Old 12-16-2010, 12:58 AM
gulfstream
 
Default Can not set execute permission to file in usb storage media with fat32 format

Very strange. The usb stick was mounted by debian system automatic. If I login with root and plug usb stick, I can execute the script after automatic mounting. But if I login with user and plug usb stick, I cann't execute it after automatic mounting with message "permission denied".


2010/12/16 Manon Metten <manon.metten@gmail.com>

> I want to execute some script file in usb storage media with fat32 format,

> but I can not set execute permission to them with "chown +x". What shall I

> do?



I don't think "chown +x" is possible on an alien FS.

On my usb stick with FAT32, all files look like they're executables.



You might simply use:



$ . ./script_file



Manon.





--

To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: http://lists.debian.org/AANLkTimxSFkTikgoMMizUbZ25+Wkmdqiv1g1nA1EwopS@mail .gmail.com
 
Old 12-16-2010, 01:09 AM
Bob Proulx
 
Default Can not set execute permission to file in usb storage media with fat32 format

gulfstream wrote:
> Very strange. The usb stick was mounted by debian system automatic. If I
> login with root and plug usb stick, I can execute the script after automatic
> mounting. But if I login with user and plug usb stick, I cann't execute it
> after automatic mounting with message "permission denied".

The automatic mounting is probably setting extra security options.
After you have mounted what are the flags for that mount point? You
can dump all of the mount information with the mount command and trim
down to just that device with grep.

$ mount | grep /media

I expect it might say something like 'noexec' there.

But in general the FAT filesystem isn't a Unix filesystem. You
shouldn't expect Unix filesystem behavior from it. Unix users,
groups, and file modes are not native there. The kernel uses an
adaptor layer to make it mostly appear as a Unix filesystem but it is
far from perfect. Trying to ignore that and act like it is a Unix
filesystem is setting yourself up for a world of hurt.

Bob
 
Old 12-16-2010, 01:14 AM
David Jardine
 
Default Can not set execute permission to file in usb storage media with fat32 format

On Thu, Dec 16, 2010 at 09:16:11AM +0800, gulfstream wrote:
> Hello everybody!
>
> I want to execute some script file in usb storage media with fat32 format,
> but I can not set execute permission to them with "chown +x". What shall I
> do?

Well, "chmod +x" might be a bit more likely to succeed.

Cheers,
David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101216021428.GA2619@gennes.augarten">http://lists.debian.org/20101216021428.GA2619@gennes.augarten
 
Old 12-16-2010, 03:43 AM
gulfstream
 
Default Can not set execute permission to file in usb storage media with fat32 format

I think that some extra security options were defined with automatic mounting also. But I don't find where to change them. The mount information as below.

$ mount | grep /media
/dev/sdb1 on /media/6361-6365 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=0,gid=0,shortn ame=mixed,dmask=0077,utf8=1,showexec,flush)



Either root


2010/12/16 Bob Proulx <bob@proulx.com>


gulfstream wrote:

> Very strange. The usb stick was mounted by debian system automatic. If I

> login with root and plug usb stick, I can execute the script after automatic

> mounting. But if I login with user and plug usb stick, I cann't execute it

> after automatic mounting with message "permission denied".



The automatic mounting is probably setting extra security options.

After you have mounted what are the flags for that mount point? *You

can dump all of the mount information with the mount command and trim

down to just that device with grep.



*$ mount | grep /media



I expect it might say something like 'noexec' there.



But in general the FAT filesystem isn't a Unix filesystem. *You

shouldn't expect Unix filesystem behavior from it. *Unix users,

groups, and file modes are not native there. *The kernel uses an

adaptor layer to make it mostly appear as a Unix filesystem but it is

far from perfect. *Trying to ignore that and act like it is a Unix

filesystem is setting yourself up for a world of hurt.



Bob


-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.10 (GNU/Linux)



iEYEARECAAYFAk0JdPUACgkQ0pRcO8E2ULZm0ACbBEcaY0B0Rs VjENJuoGsMuHyM

nJ8An0KT1Ne9NWSvxpA0NQ9Km5RuN6l0

=BaGX

-----END PGP SIGNATURE-----
 
Old 12-16-2010, 03:45 AM
gulfstream
 
Default Can not set execute permission to file in usb storage media with fat32 format

Oh, I'm sorry. It's a clerical error. I used is "chmod +x", it does not work.


2010/12/16 David Jardine <david@jardine.de>

On Thu, Dec 16, 2010 at 09:16:11AM +0800, gulfstream wrote:

> Hello everybody!

>

> I want to execute some script file in usb storage media with fat32 format,

> but I can not set execute permission to them with "chown +x". What shall I

> do?



Well, "chmod +x" might be a bit more likely to succeed.



Cheers,

David





--

To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: http://lists.debian.org/20101216021428.GA2619@gennes.augarten
 
Old 12-16-2010, 04:20 AM
Jerome BENOIT
 
Default Can not set execute permission to file in usb storage media with fat32 format

Hi GulfStream,

On 16/12/10 12:45, gulfstream wrote:

Oh, I'm sorry. It's a clerical error. I used is "chmod +x", it does not
work.



it does not work because the fat32 format does not support privileges.

Jerome




2010/12/16 David Jardine <david@jardine.de <mailto:david@jardine.de>>

On Thu, Dec 16, 2010 at 09:16:11AM +0800, gulfstream wrote:
> Hello everybody!
>
> I want to execute some script file in usb storage media with
fat32 format,
> but I can not set execute permission to them with "chown +x".
What shall I
> do?

Well, "chmod +x" might be a bit more likely to succeed.

Cheers,
David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
<mailto:debian-user-REQUEST@lists.debian.org>
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org <mailto:listmaster@lists.debian.org>
Archive: http://lists.debian.org/20101216021428.GA2619@gennes.augarten





--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4D09A184.8080303@rezozer.net">http://lists.debian.org/4D09A184.8080303@rezozer.net
 
Old 12-16-2010, 04:24 AM
gulfstream
 
Default Can not set execute permission to file in usb storage media with fat32 format

Hi Jerome,

Thank you! And I think that some extra security options were defined with automatic
mounting. Do you known where to change them?


gulfstream



2010/12/16 Jerome BENOIT <g6299304p@rezozer.net>

Hi GulfStream,



On 16/12/10 12:45, gulfstream wrote:


Oh, I'm sorry. It's a clerical error. I used is "chmod +x", it does not

work.






it does not work because the fat32 format does not support privileges.



Jerome








2010/12/16 David Jardine <david@jardine.de <mailto:david@jardine.de>>



* *On Thu, Dec 16, 2010 at 09:16:11AM +0800, gulfstream wrote:

* * > Hello everybody!

* * >

* * > I want to execute some script file in usb storage media with

* *fat32 format,

* * > but I can not set execute permission to them with "chown +x".

* *What shall I

* * > do?



* *Well, "chmod +x" might be a bit more likely to succeed.



* *Cheers,

* *David





* *--

* *To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

* *<mailto:debian-user-REQUEST@lists.debian.org>

* *with a subject of "unsubscribe". Trouble? Contact

* *listmaster@lists.debian.org <mailto:listmaster@lists.debian.org>


* *Archive: http://lists.debian.org/20101216021428.GA2619@gennes.augarten










--

To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Archive: http://lists.debian.org/4D09A184.8080303@rezozer.net
 
Old 12-16-2010, 05:56 PM
Camaleón
 
Default Can not set execute permission to file in usb storage media with fat32 format

On Thu, 16 Dec 2010 09:16:11 +0800, gulfstream wrote:

> I want to execute some script file in usb storage media with fat32
> format, but I can not set execute permission to them with "chown +x".
> What shall I do?

You can try to set the default mount options for vfat storage media
by using GNOME config editor under this key:

/system/storage/default_options/vfat/mount_options

But in my system (lenny), the execute permission is automatically set:

sm01@stt008:~$ ls -l /media | grep disk
drwxr-xr-x 3 sm01 root 1024 ene 1 1970 disk

sm01@stt008:~$ mount | grep media
/dev/sdc1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1 000)

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.12.16.18.56.22@gmail.com">http://lists.debian.org/pan.2010.12.16.18.56.22@gmail.com
 
Old 12-16-2010, 06:06 PM
Atif CEYLAN
 
Default Can not set execute permission to file in usb storage media with fat32 format

Hi,
Do you receive any error message? Also, did you try as root?

On 12/16/2010 08:56 PM, Camaleón wrote:

On Thu, 16 Dec 2010 09:16:11 +0800, gulfstream wrote:



I want to execute some script file in usb storage media with fat32
format, but I can not set execute permission to them with "chown +x".
What shall I do?


You can try to set the default mount options for vfat storage media
by using GNOME config editor under this key:

/system/storage/default_options/vfat/mount_options

But in my system (lenny), the execute permission is automatically set:

sm01@stt008:~$ ls -l /media | grep disk
drwxr-xr-x 3 sm01 root 1024 ene 1 1970 disk

sm01@stt008:~$ mount | grep media
/dev/sdc1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1 000)

Greetings,





--
/**
* @author Atıf CEYLAN
* Software Developer& System Admin
* http://www.atifceylan.com
*/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4D0A631D.2090104@atifceylan.com">http://lists.debian.org/4D0A631D.2090104@atifceylan.com
 

Thread Tools




All times are GMT. The time now is 04:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org