strange permissions problems for virtualenv python executable (lubuntu-12.10)

懵懂的女人 提交于 2019-11-28 23:34:20
duncanm

It turns out the problem was to do with how I'd mounted my shared partition. I'd mounted with (in /etc/fstab):

UUID=....  /home   hfsplus   auto,user,nodev,rw    0    0

However, the 'user' option automatically includes 'noexec' --- thus, after virtualenv had copied the system python binary to my home partition, it was unable to run because of the 'noexec' flag.

Changing my fstab to read:

UUID=....  /home   hfsplus    auto,user,exec,nodev,rw   0   0

solved the problem.

Sheena

I have had the same problem. I tried creating a virtualenv in my home folder and that worked fine, but I got that error when I tried to create one on a different partition.

So to fix your problem either try a different location or take a look at how stuff is mounted.

As the other answers (thankfully) have already stated, it is a permissions issue. I resolved it by re-mounting the required drive with the correct exec permissions (as already pointed out). But I could not use @duncanm's anwer since I could not find my drive path in the /etc/fstab file.

I executed the following on my Ubuntu 14.04 and it did the job.

To unmount -

$ sudo umount /media/ashish/Work/

To mount back with correct permissions -

$ sudo mkdir /media/ashish/Work
$ sudo mount -o exec /dev/sda6 /media/ashish/Work/
$ cd /media/ashish/Work/

I figured out the /dev/sda6 part by looking at the properties tab in the file manager.

I believe it is primarily a problem with exec permissions, as you have discovered. You might also work around this by creating the virtualenv in a subdirectory of /data or /sd-ext. I am working on multiuser support, which puts home directories under /data/home rather than just the one sd card "home directory".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!