Introduction

So if you’ve read this and thought, it doesn’t work on FreeBSD then you are right. It doesn’t. Try this instead:

You can use this portable find command with something like this.

find . -user old-user -exec chown new-user:new-group {} \;

You can expand this to find specific files with -iname options (non POSIX but available on OSX)

find . -iname '*.html' -user www-data -exec chown www-data:www-data {} \;

The . stands for the current folder and below, so you could use a specific path as a base.

find /var/www/ -iname '*.html' -user www-data -exec chown www-data:www-data {} \;
Change Ownership Recursively for a Single User FreeBSD
Tagged on:             

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

Optimization WordPress Plugins & Solutions by W3 EDGE