Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: manit123 on July 16, 2012, 08:09:21 AM
-
whenever i insert a usb stick . all files have +x so txt file does not get opened in pcmanfm it says "do you want to execute in terminal"
Please see http://www.kernel.org/doc/Documentation/filesystems/vfat.txt
mount --help says
BusyBox v1.20.1 (2012-05-31 03:26:11 UTC) multi-call binary.
Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE
Mount a filesystem. Filesystem autodetection requires /proc.
-a Mount all filesystems in fstab
-f Dry run
-i Don't run mount helper
-r Read-only mount
-w Read-write mount (default)
-t FSTYPE[,...] Filesystem type(s)
-O OPT Mount only filesystems with option OPT (-a only)
-o OPT:
loop Ignored (loop devices are autodetected)
[a]sync Writes are [a]synchronous
[no]atime Disable/enable updates to inode access times
[no]diratime Disable/enable atime updates to directories
[no]relatime Disable/enable atime updates relative to modification time
[no]dev (Dis)allow use of special device files
[no]exec (Dis)allow use of executable files
[no]suid (Dis)allow set-user-id-root programs
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
[r]bind Bind a file or directory [recursively] to another location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing flags
ro/rw Same as -r/-w
There are filesystem-specific -o flags.
Does that mean there is no way to mount vfat with showexec option ?
That would mean no files get handled by appropriate application.
http://cgit.freedesktop.org/udisks/commit/?id=7e7ec1abca069e9443f8eed49acec4ea32589d0c
-
You could try the full fat mount command in the util-linux extension.
..or use a linux filesystem on your usb stick
-
Any particular reason speaking against using "noexec"?
-
ROX-filer would have a particular related option in settings, i.e. to ignore the executable byte for known extensions on a Windows-type filesystem.
-
I installed util-linux.tcz
Now when I insert a fat16 or fat32 pendrive.
What command should I give ?
ALso as tinypoodle said 'withot installing anything can I use noexec option for fat16/fat32 '
-
I have installed util-linux .
Now , how will a USB stick get mounted with noexec option .
Do I have to mount it manually after inserting ?
-
I did mount fat file system explicitly with '-o noexec' and it worked well.
There isn't any 'noexec' for ntfs partition .
What can I do there ?
-
This worked for ntfs
ntfs-3g -o noexec <device> <mount-point>
For FAT it was
mount -o noexec <device> <mount-point>
-
util-linux wasn't needed as the output in OP shows ;)
-
Any particular reason speaking against using "noexec"?
for example i don't understood how i can run executables on vfat
-
Well if you mount with "noexec" then you can't execute... ;)
-
Is there a script which gets run on mounting USB ?
I was thinking of editing it to include option 'noexec' in it so that clicking mounts USB with desired option.
-
Hi manit123
You might want to take a look at /usr/bin/rebuildfstab
-
tc@box:/mnt/sdc1/tce/optional$ cd /usr/bin/
tc@box:/usr/bin$ ls
[ cmp fold killall patch sethostname tce-setup vi
[[ comm free killall5 pgrep setkeycodes tce-size vlock
ab crontab fromISOfile last pkill setsid tce-status waitforX
ab2tce.sh cut ftpget ldd printf setupdesktop tce-update wc
ar dc ftpput length provides.sh sha1sum tcemirror.sh wget
arping deallocvt fuser less python showbootcodes tee which
aterm desktop.sh getRGB loadfont readlink showrgb telnet who
autoscan-devices diff getTime.sh locale realpath sort test whoami
awk dirname get_device logger renice split text2lp0 xargs
backup dnsdomainname getdisklabel logname reset start-stop-daemon tftp xauth
basename dos2unix getopt logread resize startx time xkill
bbcheck.sh du head mcookie rev strings timeout xlsfonts
bcrypt dumpleases hexdump md5sum rotdash sudo top xmodmap
bigHomeFiles.sh eject history mesg rpm2cpio sudoedit tr xset
bunzip2 env hostid microcom scm sum traceroute xsetup
bzcat ether-wake hsetroot mkfifo scm-fetch.sh systool tty xsetup.sh
bzip2 exitcheck.sh id mountables.sh scm-load tail uniq xterm
cal exittc imlib2_conv nc scm-search.sh tc-terminal-server unix2dos xz
calc expr imlib2_grab nohup scm-update tce-audit unxz xzcat
chrt fdformat install nslookup script tce-fetch.sh unzip yes
chvt fgconsole ipcrm od search.sh tce-load uptime zsync
cksum filetool.sh ipcs ondemand seekWinPartition tce-remove uuid
clear find jpegtran openvt select tce-run uuidgen
cliorx flock keyword.sh passwd seq tce-setdrive version
I did not find any such file.
-
Hi manit123
Of course you won't find it if I give you the wrong information, that should have been /usr/sbin/rebuildfstab
-
yeah , there is rebuildfstab script file in /usr/sbin.
how wIll it know to use 'noexec' option ?
-
Hi manit123
That script updates the entries in /etc/fstab. It is run when you first boot and anytime you plug/unplug a thumb
drive. You will need to go through it and find where it determines the file system type and modify it to include
the noexec option in the appropriate lines of fstab.