b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

Explanation: File Permissions Angst

by Jon on July 23rd, 2006

I recently moved our podcast, The JaK Attack! to a new server. My master plan was to just tar up the directories, wget them across to the new server, untar them and call it a day. Well, I had to dump and restore the databases as well, but that’s another story.

What I very quickly learned is that it’s very easy to lose file permissions and ownerships when you do what I did. When untarring the file onto the new server, it’s important to do it as the user who owns the account, and not the root user. Untarring the tarball as the root user will make the new files owned by root which can cause all sorts of problems with whatever CMS or blogware you’re running. It’s not that hard to recursively change ownership:

chmod -R newuser.newuser *

but it can produce some spectactularly ugly errors at the onset.

I’ve also found that in some cases, the newly untarred files would have all of their ‘w’rite permissions stipped from them. Again, not a big deal to restore it, but can also be the cause of some ugly errors.

I’m 100% sure that the way I did the server transfer could have been done better. There must be ways to preserve the file permissions when doing this. I’m not sure about the ownership, however, as it’s entirely possible to untar a bunch of files that are owned by a user on the old server that doesn’t exist on the new server.

Anyhow - not a lot of information in this post, but I wanted to share that if you’re doing something like this and getting all sorts of ugly errors, you may want to take a look at the new files’ permissions and ownership.

POSTED IN: Explanation

0 opinions for Explanation: File Permissions Angst

  • No one has left a comment yet. You know what this means, right? You could be first!

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing