[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 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,shortname=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)

iEYEARECAAYFAk0JdPUACgkQ0pRcO8E2ULZm0ACbBEcaY0B0RsVjENJuoGsMuHyM
nJ8An0KT1Ne9NWSvxpA0NQ9Km5RuN6l0
=BaGX
-----END PGP SIGNATURE-----



Reply to: