[英]IEx block with sudo and System.cmd(“mount”)
一些精度:
$> iex --version
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
IEx 1.4.4
$> mix --version
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
Mix 1.4.4
我是法国人,我不明白为什么
$> iex -S mix
有一些错误:
$> sudo iex -S mix
我想在IEx中执行命令:
System.cmd("mount", ["-t", "ecryptfs", ".private", "private", "-o", ~s(key=passphrase,passphrase_passwd="pass",ecryptfs_enable_filename_crypto=n,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=n)], [stderr_to_stdout: true])
用于测试和安装ecryptfs分区。 在
$> iex -S mix
iex(2)> System.cmd("mount", ["-t", "ecryptfs", ".private", "private", "-o", ~s(key=passphrase,passphrase_passwd="pass",ecryptfs_enable_filename_crypto=n,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=n)], [stderr_to_stdout: true])
{"mount: mount : seul le superutilisateur peut utiliser l'option « --options »\n",1}
我拥有正确的价值,无特权的坐骑 。
附:
$> sudo iex -S mix
iex(2)> System.cmd("mount", ["-t", "ecryptfs", ".private", "private", "-o", ~s(key=passphrase,passphrase_passwd="pass",ecryptfs_enable_filename_crypto=n,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=n)], [stderr_to_stdout: true])
该命令会错误并打印任何内容。 它只是块。 没有返回错误代码,什么也没有,只是阻塞。 IEx不打印任何内容。
我有该错误的屏幕截图:
好的,System.cmd不想在参数中引用。 好的。 :/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.