Date: Thu, 10 Jan 2002 20:43:23 -0800 (PST) From: Annelise Anderson <andrsn@andrsn.stanford.edu> To: Tom Kersten <tomkersten98@yahoo.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Troubled newbie....PLEASE HELP!!! Message-ID: <Pine.BSF.4.10.10201102026230.30965-100000@andrsn.stanford.edu> In-Reply-To: <20020110053413.75156.qmail@web10008.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 9 Jan 2002, Tom Kersten wrote: > Hello, > > I am in desperate need of help. I can not get the > permissions > to come out correctly when I try to CVSup my ports (& > docs). > Currently I am getting the permissions of 700 (in > relation to > root) Here is what I have for config files and what I > have done.. > # change "RELENG_4" to "RELENG_3" or "RELENG_2_2" > respectively. > *default release=cvs tag=RELENG_4 > *default delete use-rel-suffix > > # If your network link is a T1 or faster, comment out > the following line. > *default compress > > ## Main Source Tree. > # > # The easiest way to get the main source tree is to > use the "src-all" > # mega-collection. It includes all of the individual > "src-*" collections. > # Please note: If you want to track -STABLE, leave > this uncommented. > ports-all tag=. > doc-all > > > ---------------clipped--------- > > > #my umask > root# umask > 700 > > #so I changed it to 022 (to change perm. to 755) > root# umask 22 > > #double check to make sure it worked > root# umask > 022 > > #okay, now I changed to /usr/ports (which probably > isn't necessary, but) > #and ran cvsup > > root# cd /usr/ports > root# cvup /etc/stable-supfile > > > #that completes successfully, so now I check the > permissions again > root# ls (equivalent to ls -l from my shell settings) > total 2123 > drwxr-xr-x 46 root wheel 1024 Jan 8 13:35 ./ > drwxr-xr-x 18 root wheel 512 Dec 21 19:24 ../ > -rw-r--r-- 1 root wheel 19 Jul 14 1997 > .cvsignore > -rw-r--r-- 1 root wheel 1988444 Jan 6 11:43 > INDEX > -rw-r--r-- 1 root wheel 12163 Dec 27 09:27 > LEGAL > -rw-r--r-- 1 root wheel 3221 Dec 23 03:58 > Makefile > drwx------ 2 root wheel 512 Jan 8 13:05 Mk/ ... My guess (I don't have the energy to do a real test) is that the umask is used for creation of new files (and directories). A umask of 022, which you should have set for both users and root, will give you 755 for directories and 644 for files. But files (including directories) that already exist probably won't have their modes changed. I assume all directories in /usr/ports have 755 and all regular files have 644. You could run a find command that finds under /usr/ports all directories and then runs the command to change the mode to 755, and similarly with regular files, changing the mode to 644. Since you have cvsupped src-all the same way, you might need to change those files as well. chmod has a -R (recursive) option and I suppose you could try, in the appropriate directories, changing all files, but by itself I don't think chmod distinguishes directories and regular files. (You also have to pay attention to what it does to symbolic links.) You could write a shell script with an option to test for a regular file or a directory and change the mode appropriately. If you have a fast connection, it may be easier to delete ports and src altogether (and whatever else you cvsupped, doc as I recall), cvsup src, and get the ports tarball for the most recent ports and extract to get an up-to-date ports tree. [Actually I think recursive chmod and recursive chown as well are some of the most dangerous commands to run if you don't know what you precisely what you expect and how to get it.] Annelise -- Annelise Anderson Author of: FreeBSD: An Open-Source Operating System for Your PC Available from: BSDmall.com and amazon.com Book Website: http://www.bittreepress.com/FreeBSD/introbook/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10201102026230.30965-100000>