On Monday, March 18, 2002, at 07:01 PM, Christopher C. Lamer wrote:
> Further, when I try to put things into Fink's /sw/src folder, it says > that I > don't have permission. I'm the only one who has a profile on my > computer. > Why can't I drag a file into that folder? Actually, you're not the only user on your system. In the Terminal, run the following command to see who else has an account on your computer: niutil -list / /users As you can see, there are some other accounts there as well. This is because in Unix each process "belongs" to a user to determine who has the ability to affect that process in some way. The same can be said for files, each file "belongs" to someone. It is a safer practice to run certain services (such as Apache) under a separate user than root, since if Apache is compromised by someone trying to crack your system then they could have access to everything on the box. Likewise, you don't want to run Apache as yourself or under someone else who uses your computer, because then you might inadvertently (or someone else might intentionally) do something to interfere with the stability of Apache. Even though you're the only user on your system, Unix was designed with inherent support for multiple users (a good example of how old this OS really is, from a time when personal computers were very rare), so these are important issues. Darwin protects itself from unintentional damage even by Admin users such as yourself by protecting certain directories from being written to. This protection system is known as the Unix "file permissions system". You can do a google search for Unix file permissions and find a million explanations of how this works, so I'll hold off for now. You actually do have the ability to override this built-in protection, but you probably shouldn't unless you have a good idea of what you're doing and a good reason for it. Any command that you execute prefixed by "sudo" will override just about any permissions barrier you encounter. This is because executing a command with "sudo" basically means "run this command as root" and there is nothing on the system that root cannot do. Why does /sw/src protect itself in this fashion? Mainly because it's not a directory that most people should be writing into (files could be overwritten, other problems could arise). And the assumption is that if you are trying to move some code into /sw/src, you probably already know how to use the "sudo" command to do it. You can't normally do superuser actions from the finder, it needs to be done in Terminal with sudo. I think there is a shareware program out there that will let you operate as root in the Finder but I don't know much about it. (If you're not familiar with the NetInfo database or the niutil command, try "man niutil" for more info. Here's a helpful explanation of how NetInfo relates to the traditional Unix file "/etc/passwd": http://www.macaddict.com/osx/xphiles/12_05_00.html) To directly address your issue, can I give you some advice? You were trying to put things into /sw/src -- I actually recommend that you don't do this unless you know that Fink will know what to do with them. The /sw directory isn't "officially" restricted to Fink-related things, but if you ever wanted to just dump your Fink stuff or start from scratch you would have only one directory to remove, rather than hunting all over kingdome come looking for different software and separating out the stuff you want to keep. Traditionally in Unix distributions, software that was copied to a particular computer (as opposed to all computers with that distribution installed) would go into a director called /usr/local. The "local" part means "software in here is local to this machine and may or may not appear on other machines". I have a directory that I created called /usr/local/src, which has subdirectories for each non-Fink piece of software I've built on my system. For instance, I have /usr/local/src/php4.1.2, /usr/local/src/apache_1.3.22, /usr/local/src/mysql-3.23.46, et cetera. There's an extra directory where I keep the tarballs in case I ever need to start from scratch with something, called "/usr/local/src/tarballs". You may wish to create your own /usr/local/src directory and keep your non-Fink Unix software source code in there. mkdir /usr/local/src Purely a personal choice, but possibly a more organized way to store your files. Erik _______________________________________________ Fink-beginners mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-beginners
