Changing the owner of your ports tree

Changing the owner of your ports tree

This is a fairly advanced topic.  I don’t mean it’s complicated.
  It’s just that there is very little reason for anyone to want to do this.

wanted my ports tree to be maintained by something other than root.  By default,
FreeBSD allows the ports tree to be written only by root. That’s mostly by

The chown commands

Here’s what I did:

cd /usr/ports
chown -R dan:dan /usr/ports

I also changed the cron job (in /etc/crontab) to run as dan:

53 6 * * * daemon /usr/local/bin/cvsup -P m 
       2>&1 | mail -s "buff Ports cvsup"

Note: The above actually appears on one line and is split into multiple lines to make
it easier to read.  In your crontab, it should appears all on one line. And remember
to use tabs, not spaces, especially in the "53 6 * * *" part.  This job
runs at

The first time my ports cron job ran, I got this error:

Updater failed: Cannot create 
Permission denied

So I did this:

cd /usr
chown -R dan:dan sup

Then I ran the cvsup job again and it ran just fine.

Leave a Comment

Scroll to Top