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 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