简体   繁体   English

在Linux中启用目录的写权限

[英]Enable write permission for directory in Linux

I keep trying to move files from a directory on Linux- but I keep getting permission errors. 我一直试图从Linux上的目录中移动文件,但是我一直收到权限错误。

Initially I was told 最初我被告知

sudo chmod -R r+w /directory/*

But this only applies it to the directory folder (and not the files inside) 但这仅将其应用于目录文件夹(而不应用于其中的文件)

Trick is- you need to "select all" to apply the file permissions to: 技巧是-您需要“全选”才能将文件权限应用于:

sudo chmod -R a+rwx,go-w /directory/

And that's it 就是这样

或者,您可以执行sudo chmod 777 /dir/ ,这只是执行上述答案的一种简单方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM