[英]File Permission issue javac
I have files in a directory. 我在目录中有文件。 Some have root as the owner and group and some user (me) as owner and group (however that happened).
有些用户以root作为所有者和组,而某些用户(me)作为所有者和组(但是发生了)。 I ran
sudo chmod 755 -R /usr/casloader
, all my directories are under /usr/casloader
. 我运行了
sudo chmod 755 -R /usr/casloader
,我的所有目录都在/usr/casloader
。 All files are -rwxr-xr-x
. 所有文件都是
-rwxr-xr-x
。
I am trying to compile a java class (as me the user) - if run the javac on a file that owner/group is root
, I can compile fine. 我正在尝试编译一个Java类(对我来说是用户)-如果在所有者/组为
root
的文件上运行javac,则可以正常编译。 The owner/group of the compiled class becomes me. 编译后的类的所有者/组成为我。 (it writes the compiled class into the same folder).
(它将已编译的类写入同一文件夹)。
But if I try compile a class that owner group is me it gives file write error: Permission Denied
. 但是,如果我尝试编译一个属于所有者组的类,则会出现
file write error: Permission Denied
。
How do I solve this? 我该如何解决? Does everything have to be root?
一切都必须是根吗?
I just did g+w,o+w with a -R. 我只是用-R做g + w,o + w。 so I have rwxrwxrwx - so the problem is solved.
所以我有rwxrwxrwx-这样问题就解决了。 (Not sure if this is the most optimal solution.)
(不确定这是否是最佳解决方案。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.