Home > php教程 > PHP开发 > Change the owner or group of a file or directory in Linux

Change the owner or group of a file or directory in Linux

巴扎黑
Release: 2016-11-07 10:43:34
Original
2178 people have browsed it

Linux changes the owner or group of a file or directory

During the ftp upload process, if you upload a file while logging in as root in sftp mode, you will be prompted to have no permission when uploading via ftp again. The reason is because the file has already been entered as root. user, how to restore the permissions of the www user in ftp?
Then you will use the chmod command. Let’s first understand the chmod command:

chmod [-cfhvR] [--help] [--version] user[:group] file...

Change the owner or group of a file or directory in Linux

// Change the permissions and group of the rootfs folder and its subdirectories to the www group
chown –R www:www /wwwroot/zoneselr.org
// Change the owner and group of the rootfs folder and subdirectories to the user liufan and group liufan-desktop
chown –R liufan:liufan-desktop rootfs

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template