Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 13] Permission denied: '.lock' #2

Open
jiongHub opened this issue May 9, 2014 · 3 comments
Open

OSError: [Errno 13] Permission denied: '.lock' #2

jiongHub opened this issue May 9, 2014 · 3 comments

Comments

@jiongHub
Copy link

jiongHub commented May 9, 2014

following code in init.py

_lock_dir = '.lock'
if os.path.exists(_lock_dir):
pass
else:
os.mkdir(_lock_dir)

when I import mlogging , it will mkdir in current path;
if it has no Permission,
will raise OSError: [Errno 13] Permission denied: '.lock'
why not use absolutePath like '/tmp/.lock'

@kieslee
Copy link
Owner

kieslee commented May 12, 2014

I'm very glad to see that someone using the mlogging module.
Put the .lock into the pwd is to avoid the conflict if you put the .lock into the /tmp when you run two process use the mlogging.

I will fix this issuse this week.

@jiongHub
Copy link
Author

Thanks for answer
two process? do you meaning two diffirent log files in same name?
lock is only for the log file, if use the log file's absolute path or path's hash, it will not repeated
by the way, when permission is given, the program run in daemon has problem too, because the pwd will changed to root path, if still use relative path, you should fix it
Hope better solution

@zhangqunshi
Copy link

is this fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants