Skip to content
Menu
ComaNotiz ComaNotiz
  • How To’s
  • Network
  • Windows
  • Telefon
  • iPhone
  • Linux
  • Dreambox
  • Repair
  • Office
  • Eagle
  • Temp. Logger
ComaNotiz ComaNotiz

FTP Permissions

Posted on 26.03.201603.03.2019 by Milan
  1. Add pi to the www-data group using the command sudo adduser pi www-data
  2. Add www-data to the pi group using the command sudo adduser www-data pi
  3. Change the permission of the directory and everything in it so that it's readable and writable by the group. Use the command sudo chmod -R 775 /var/www.
  4. Since user pi is part of www-data group, doing this allows the pi to modify files.
  5. Since user www-data is part of pi group, this allows nginx to read files created by pi.
  6. Confusing? This is because users www-data and pi have their own groups also named www-data and pi.
  7. Make sure everything in the folder is owned by www-data.
    • sudo chgrp -R www-data /var/www
Oder:

  1. sudo chmod g+s /var/www
  2. sudo chmod 775 /var/www
  3. sudo chown -R www-data:www-data /var/www

useradd Example – Add a new user to secondary group

You need to the useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. The syntax is as follows:
useradd -G {group-name} username

usermod example – Add a existing user to existing group

Add existing user tony to ftp supplementary/secondary group with the usermod command using the -a option ~ i.e. add the user to the supplemental group(s). Use only with -G option:
# usermod -a -G ftp tony

 

Linux

Log In

Recent Posts

  • FritzFritz Repeater Specifikations
  • How to Install Windows 11 Without a Microsoft Account
  • Proxmox – Tips / Commands
  • Synology DSM 7 with Lets Encrypt and DNS Challenge
  • Proxmox Resize

Categories

  • 3D Print
  • Apple
  • Audio & Video
  • Dreambox
  • Eagle
  • Electronic
  • Home Asisstant
  • How To's
  • iPhone
  • iPod
  • Konsole
  • Linux
  • Media Wiki
  • NAS
  • Network
  • Office
  • Raspberry Pi
  • Repair
  • Telefon
  • Tips & Tricks
  • Uncategorised
  • Uncategorized
  • Windows
  • Xbox
©2025 ComaNotiz | Powered by Superb Themes