Posts

Showing posts with the label find

https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Owner and Perm of Web Items in FreeBSD

Image
The following steps provide all directories and files in the "data" folder with the appropriate ownership and permissions to ensure smooth operation of the web server. This also prevents unauthorized users from viewing and modifying them. ========== 1. Log in to "root". Regular users must be part of the "wheel" group in order to do this. user@host: $ su - 2. Change ownership of all items to user "root" and group "www". root@host: # chown -R root:www /usr/local/www/apache24/data 3. Change permission modes to 750 for directories only. User "root" can (r)ead, (w)rite, and e(x)ecute directories. Users included in the group "www" can (r)ead and e(x)ecute but NOT write to directories. All other users are excluded. root@host: # find /usr/local/www/apache24/data -type d -exec chmod 750 {} + 4. Change permission modes to 640 for files only. User "root" can (r)ead and (w)rite but NOT execute files. Users included i...

Owner and Perm of Web Items in Debian-based Linux

Image
The following steps provide all directories and files in the www folder with the appropriate ownership and permissions to ensure smooth operation of the web server. This also prevents unauthorized users from viewing and modifying them. ========== 1. Change ownership of all items to user "root" and group "www-data". user@host: $  sudo chown -R root:www-data /var/www 2. Change permission modes to 750 for directories only. User "root" can (r)ead, (w)rite, and e(x)ecute directories. Users included in the group "www-data" can (r)ead and e(x)ecute but NOT write to directories. All other users are excluded. user@host: $  sudo find /var/www -type d -exec chmod 750 {} + 3. Change permission modes to 640 for files only. User "root" can (r)ead and (w)rite but NOT execute files. Users included in the group "www-data" can (r)ead but NEITHER write NOR execute files. All other users are excluded. user@host: $  sudo fi...