View Single Post
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#26
Originally Posted by nicholes View Post
And another thing, if record.py in MyDocs, even after sudo gainroot,it does not start camera and shows "permission denied"
thus i cannot save my videos in Mydocs folder

to use record.py in my phone. Record.py should be in root folder(home/user)
MyDocs is vfat filesystem mounted with noexec option which prevents you from making files executable on it. And thus you have no permission to execute it => "Permission denied". You can still run scripts from it by executing interpreter and passing the script name to it as an argument:
Code:
$ python record.py
But you don't need to put the script in the same folder. Just run it using absolute path:
Code:
$ cd MyDocs/.videos/or/whatever/wherever
$ /home/user/bin/record.py
It will use current folder as working directory.

And /home/user is not root folder, it's users' $HOME directory. $HOME for user root is typically /root and the root directory is /
 

The Following User Says Thank You to int_ua For This Useful Post: