Ubuntu System extract Directory attribute ls-ld/home/demo/public_html

Source: Internet
Author: User
Keywords Ubuntu extract Catalog properties
Tags catalog catalog properties create data delete directory file files

Ubuntu System extract Directory attribute ls-ld/home/demo/public_html

linux@ubuntu:~$ ls-ld/home/demo/public_html/

Drwxr-xr-x 2 Demo demo 4096 2010-01-11 20:09/home/demo/public_html/

linux@ubuntu:~$ Groups Demo

Demo:demo Www-data

linux@ubuntu:~$ sudo chgrp-r www-data/home/demo/public_html/

[sudo] password for Linux:

linux@ubuntu:~$ ls-ld/home/demo/public_html/

Drwxr-xr-x 2 demo www-data 4096 2010-01-11 20:09/home/demo/public_html/
linux@ubuntu:~$

In this way, public_html belongs to the demo user and www-data this group

However, the Apache through the Www-data users to create new files and new directories, demo through FTP or can not delete, how to solve it?

Although this command is added-R, but this cycle is only the SSH login demo account or FTP upload to create a new file, the new directory has the effect of recursive permissions, that is, the newly created files or directories, demo has permissions through FTP to delete, But www-data create new files and new directories, demo can not be deleted, for example, some of the Web site cache files, Web site installation of some extensions, components, plug-ins, templates and so on are all through the Apache Www-data to write and create the generated, Although the demo user is in the Www-data group with the Www-data user, the demo does not have permission to delete the files and directories Www-data created.

Obviously, if is dividing http://www.aliyun.com/zixun/aggregation/14840.html "> virtual host, to public_html this directory permission setting is not enough, Customers simply cannot manage their web sites via FTP.

What are we going to do with this?

What we want to achieve is:

1, demo user login through FTP to/home/demo/this directory and locked in this directory
2, demo through FTP, under the/home/demo/public_html/can create and delete any file, not only the previous file, there are later Www-data read and write files and directories.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.