As in CENTOS add a user to www-data



  • That's the problem. VDS CMS Joomla And when I put something through it, it becomes the owner. apache, eventually, when I try to change things ftp I can't do that. I have to go through the panel. ISP And there's a change of rights.

    I've read need to add my user to the group. www-data But I don't know how to do this, but I haven't found any information on this yet. Help me get this straight.

    Name of my user testuser

    Here's the way to the folder with my website. /var/www/testuser/data/www/mysite.ru

    I have a Centos operating system, so do we have access to ssh.

    On ssh, I wanted to do this:

    Add my user to this team - sudo adduser testuser www-data

    After chown testuser:www-data -R /var/www/testuser/data/www/mysite.ru

    And the poster... chmod -R 775 /var/www/testuser/data/www/mysite.ru

    But I couldn't do all of this for the wrong team.

    Friends, what am I doing wrong? Help me get this straight.



  • Add my user to this team

    sudo adduser testuser www-data
    

    Total redhat-core The distributive of this syntaxis is not “processed” because /usr/sbin/adduser - it's just a symbolic reference to /usr/sbin/useradda programme useradd not intended Addendum the user in the group.

    such a syntax will pass debian-core Distributives where /usr/sbin/adduser - That's it. perl-cryptabout man adduser It says:

    adduser and addgroup are friendlier front ends to the low level tools like useraddgroupadd and usermod programs.

    My free translation:

    adduser and addgroup - it's wrapped around low-level instruments. useraddgroupadd and usermod


    I mean, you're gonna have to use a low-level tool to add a user to the group. usermodWho knows that:

    $ sudo usermod -a -G группа пользователь
    

    where:

    • -a - add the user to the additional group(s) only used with the option -G
    • -G группы - List of additional groups (if more than one group is indicated, separator - comma)

    Look more carefully. man usermod In your system.


    See current membership in groups, for example, through the programme groups:

    $ groups root
    root : root bin daemon sys adm disk wheel
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2