embeded/odroid2016. 10. 14. 20:40

어라... 리눅스 커널 받아서 빌드 하려니까

퍼미션 부족으로 인해 실행이 안된다고 배째서 확인을 해보니


[링크 : http://android.stackexchange.com/.../why-can-i-not-assign-exec-permissions-to-a-file-on-the-sd-card]


$ mount

/dev/mmcblk1p2 on / type ext4 (rw,noatime,nodiratime,errors=remount-ro)

proc on /proc type proc (rw,noexec,nosuid,nodev)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)

none on /sys/fs/cgroup type tmpfs (rw)

none on /sys/kernel/debug type debugfs (rw)

udev on /dev type devtmpfs (rw,mode=0755)

devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,mode=1777)

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)

none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)

none on /run/shm type tmpfs (rw,nosuid,nodev)

none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)

/dev/mmcblk1p1 on /media/boot type vfat (rw,nosuid,nodev,flush,umask=000)

systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)

gvfsd-fuse on /run/user/1001/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=odroid)

/dev/mmcblk0p1 on /media/odroid/BOOT type vfat (rw,nosuid,nodev,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)



$ sudo mount -o remount,rw,umask=0000 /dev/mmcblk0p1 /media/odroid/BOOT


$ mount

/dev/mmcblk1p2 on / type ext4 (rw,noatime,nodiratime,errors=remount-ro)

proc on /proc type proc (rw,noexec,nosuid,nodev)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)

none on /sys/fs/cgroup type tmpfs (rw)

none on /sys/kernel/debug type debugfs (rw)

udev on /dev type devtmpfs (rw,mode=0755)

devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,mode=1777)

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)

none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)

none on /run/shm type tmpfs (rw,nosuid,nodev)

none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)

/dev/mmcblk1p1 on /media/boot type vfat (rw,nosuid,nodev,flush,umask=000)

systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)

gvfsd-fuse on /run/user/1001/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=odroid)

/dev/mmcblk0p1 on /media/odroid/BOOT type vfat (rw,umask=0000)


remount 해봤으나.. 여전히 chmod 로 777 변경해도 안바뀐다..

심지어 sudo chmod 777 해도 ㄷㄷㄷ


umask가 아니라 다른걸로 해줘야하나?

$ sudo mount -t ntfs -o rw,auto,user,fmask=0022,dmask=0000 /dev/whatever /mnt/whatever 

[링크 : http://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition]


       dmask=value

              Set the umask applied to directories only.

  The default  is  the umask of the current process.  The value is given in octal.


       fmask=value

              Set the umask applied to regular files only.

  The default is the umask of the current process.  The value is given in octal. 


       showexec

              If set, the execute permission bits of the file will be allowed

 only if the extension part of  the name is .EXE, .COM, or .BAT. Not set by default.



remount,exec

[링크 : http://android.stackexchange.com/questions/35658/adb-permission-denied-to-run-a-configure-file]

[링크 : http://www.linuxquestions.org/./permission-denied-when-trying-to-execute-an-application-on-a-sd-card./]


음.. auto, exec 등등 여러가지 넣어줘도 안되네.. 걍 ext4로 밀어 버릴까..


+

2016.10.15


showexec로 인해서 확장자 별로 자동으로 인식이 된다는데 실험...


$ touch a.exe

odroid@odroid_1:/media/odroid/MYLINUXLIVE$ ll

total 12

drwx------  2 odroid odroid 8192 oct 16 01:08 ./

drwxr-x---+ 3 root   root   4096 oct 16 01:08 ../

-rwxr-xr-x  1 odroid odroid    0 oct 16 01:08 a.exe*


$ chmod 444 a.exe


$ ll

total 12

drwx------  2 odroid odroid 8192 oct 16 01:08 ./

drwxr-x---+ 3 root   root   4096 oct 16 01:08 ../

-rwxr-xr-x  1 odroid odroid    0 oct 16 01:08 a.exe*



걍.. 퍼미션이 확장자 따라가는 듯.. vfat에서는

[링크 : https://www.kernel.org/doc/Documentation/filesystems/vfat.txt]

'embeded > odroid' 카테고리의 다른 글

odroid u3 커널 빌드  (0) 2016.10.15
odroid kernel boot args 설정 관련  (0) 2016.10.15
uboot emmc command  (0) 2016.10.14
odroid 커널.. 환경 설정 파일 /proc  (0) 2016.10.13
odroid u3 eMMC + SD 부팅 방법...  (0) 2016.10.13
Posted by 구차니