Centos 复制文件【文件授权】

cp: cannot create regular file `/usr/sbin/ddclient': Permission denied

 

Most users cannot write outside their own home directory by default (except in places like /var/tmp, /tmp and other temporary directories). This means that you need to be root in order to copy that file to /usr/sbin. Also note that if you copy that file to /usr/sbin only root will be able to use it without entering the full path of the command because */sbin directories are not usually in the path of normal users.

 

--------------

以上摘自网络: 红色部分:大多数用户不能将文件写到除了用户目录以外的地方。

own home directory 每个linux 系统下都用自己的一个 用户目录。

 

/home/user_name

 

 

在 centos 中如果想要把 home 目录下的文件复制到 其他目录

 

会提示  cannot create regular file  xxxx Permission denied 

 

解决办法: su  回车 【以root身份操作】

 

你可能感兴趣的:(linux,centos,网络,File,command,Path)