[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



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

Attachment: signature.asc
Description: Digital signature


Reply to: