The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

Changing the owner of your ports tree 21 June 2000
Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles
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.

I 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 
       /usr/home/ports-supfile 
       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 
"/usr/sup/ports-all/#cvs.cvsup-80304.0":
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.

Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles