Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Django 'mydir' 中创建了一个目录,里面有几个文件。如何保护这些文件,以便只有 django 可以访问它而没有其他人可以访问?
可以通过以下方式完成:
os.chmod('mydir', 0o400)