請問放在/dev/shm/下面的任何檔案都無法執行(已解決) [論壇 - LinuxMint]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊

(1) 2 »


請問放在/dev/shm/下面的任何檔案都無法執行(已解決)
管理員
註冊日期:
2010/5/7 5:46
所屬群組:
已註冊使用者
討論區管理群
等級: 31
HP : 0 / 755
MP : 434 / 29544
EXP: 23
離線
問題是這樣的
我會把一些軟體放在/dev/shm/下面執行
可是從某次更新之後就變成不能執行(更正:沒有改成不能)
想請問大大們解法
像以下的例子
./doublecmd
bash: ./doublecmd: 拒絕不符權限的操作

sudo ./doublecmd
sudo: unable to execute ./doublecmd: Permission denied

2012/12/15 20:00
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行
會員五級
註冊日期:
2008/10/7 21:19
所屬群組:
已註冊使用者
等級: 36
HP : 0 / 896
MP : 661 / 39169
EXP: 85
離線
試試看賦予可執行權限:
chmod +x doublecmd

2012/12/15 20:12
I′m UGP
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行
管理員
註冊日期:
2010/5/7 5:46
所屬群組:
已註冊使用者
討論區管理群
等級: 31
HP : 0 / 755
MP : 434 / 29544
EXP: 23
離線
UGP 寫到:
試試看賦予可執行權限:
chmod +x doublecmd

謝謝UGP
不過還是不行
我補充一下
只有放到/dev/shm/下面的東西不能執行,其他地方則可以

2012/12/15 20:28
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70767
EXP: 24
離線
sudo ls -al / | grep dev
sudo ls -al /dev | grep shm
sudo df /dev
sudo df /dev/shm
看看有何變化

2012/12/15 20:32
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行
管理員
註冊日期:
2010/5/7 5:46
所屬群組:
已註冊使用者
討論區管理群
等級: 31
HP : 0 / 755
MP : 434 / 29544
EXP: 23
離線
依序為:
sudo ls -al / | grep dev
drwxr-xr-x 16 root root 3700 12月 15 19:37 dev

sudo ls -al /dev | grep shm
crw------- 1 root root 10, 61 12月 16 2012 ashmem
lrwxrwxrwx 1 root root 8 12月 15 18:33 shm -> /run/shm

sudo df /dev
檔案系統 1K-區段 已用 可用 已用% 掛載點
udev 10240 0 10240 0% /dev

sudo df /dev/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
tmpfs 810960 686936 124024 85% /run/shm

2012/12/15 20:39
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70767
EXP: 24
離線
sudo df /dev/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
tmpfs 810960 686936 124024 85% /run/shm


這個 跟我的不同

sudo df /dev/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
none 4133156 160 4132996 1% /run/shm

你的 /dev/shm 掛載在 tmpfs ?
還是 tmpfs 掛載在 /dev/shm ?

還可以試試
sudo ls -al / | grep run
sudo ls -al /run | grep shm
sudo df /run
sudo df /run/shm

2012/12/15 21:06
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行
管理員
註冊日期:
2010/5/7 5:46
所屬群組:
已註冊使用者
討論區管理群
等級: 31
HP : 0 / 755
MP : 434 / 29544
EXP: 23
離線
poloshiao 寫到:
sudo df /dev/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
tmpfs 810960 686936 124024 85% /run/shm


這個 跟我的不同

sudo df /dev/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
none 4133156 160 4132996 1% /run/shm

你的 /dev/shm 掛載在 tmpfs ?
還是 tmpfs 掛載在 /dev/shm ?

還可以試試
sudo ls -al / | grep run
sudo ls -al /run | grep shm
sudo df /run
sudo df /run/shm

依序是:
sudo ls -al / | grep run
drwxr-xr-x 25 root root 960 12月 15 21:19 run

sudo ls -al /run | grep shm
drwxrwxrwt 6 root root 200 12月 15 21:20 shm

sudo df /run
檔案系統 1K-區段 已用 可用 已用% 掛載點
tmpfs 405488 900 404588 1% /run

sudo df /run/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
tmpfs 810960 83784 727176 11% /run/shm

如果不正確的話要如何改呢?謝謝

2012/12/15 21:24
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70767
EXP: 24
離線
sudo df /run/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
tmpfs 810960 83784 727176 11% /run/shm

這個也不一樣
sudo df /run/shm
檔案系統 1K-區段 已用 可用 已用% 掛載點
none 4133156 160 4132996 1% /run/shm

如果不正確的話要如何改呢?


How to disable tmpfs on /run/shm in proper way
Answer:
By default (at least on Debian wheezy), /run/shm is a subdirectory of /run, which is mounted as tmpfs. So if you don't want /run/shm to be a mount point, don't change the default configuration. If you create an entry for /run/shm in /etc/fstab, it will be mounted only if you specify the filesystem type; otherwise /dev/shm is bind-mounted there. Not having /run/shm as tmpfs is not a supported configuration. If you want to use some other filesystem type, create an fstab entry and edit /etc/init.d/mountall.sh and /etc/init.d/mountdevsubfs.sh so that they call mount_shm with an argument other than mount or mount_update. Whatever you do, make sure that /run/shm is mode 1777 and has no files left over from a previous boot.

2012/12/15 21:48
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行
管理員
註冊日期:
2010/5/7 5:46
所屬群組:
已註冊使用者
討論區管理群
等級: 31
HP : 0 / 755
MP : 434 / 29544
EXP: 23
離線
poloshiao 寫到:
如果不正確的話要如何改呢?


How to disable tmpfs on /run/shm in proper way
Answer:
By default (at least on Debian wheezy), /run/shm is a subdirectory of /run, which is mounted as tmpfs. So if you don't want /run/shm to be a mount point, don't change the default configuration. If you create an entry for /run/shm in /etc/fstab, it will be mounted only if you specify the filesystem type; otherwise /dev/shm is bind-mounted there. Not having /run/shm as tmpfs is not a supported configuration. If you want to use some other filesystem type, create an fstab entry and edit /etc/init.d/mountall.sh and /etc/init.d/mountdevsubfs.sh so that they call mount_shm with an argument other than mount or mount_update. Whatever you do, make sure that /run/shm is mode 1777 and has no files left over from a previous boot.

謝謝
不過我英文很爛,能否說明一下

2012/12/15 22:34
應用擴展 工具箱
回覆: 請問放在/dev/shm/下面的任何檔案都無法執行

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70767
EXP: 24
離線
明天早上 再幫你翻譯

2012/12/15 22:48
應用擴展 工具箱

(1) 2 »

 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.