Monday, 12 May 2008

500: [warn] Directory / is not owned by username

If your site is getting a 500 error, you’ll want to check Apache’s error_log at /usr/local/apache/logs/error_log.

If you see the following error, you’ll want to check the ownership of “/” to ensure it’s owned by root:root, and not a user on your server.

[Mon May 13 2:26:47 2008] [warn] Directory / is not owned by rrsdd

Let’s check the ownership:

# stat /
File: `/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 1bh/27d Inode: 99717474 Links: 26
Access: (0755/drwxr-xr-x) Uid: ( 535/ cpus123) Gid: ( 0/ cpus123)

This shows that the / folder is owned by “cpus123? which is incorrect, and you’ll want to change the ownership to root:root.

#chown root:root /

Now let’s verify:

# stat /
File: `/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 17h/23d Inode: 917505 Links: 25
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)

No comments:

Post a Comment