New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Messed up public web permissions

Got problems with Bubba? Then this forum is for you.
Locked
GaryL
Posts: 87
Joined: 04 Sep 2007, 17:40
Location: Northern Ireland

Messed up public web permissions

Post by GaryL »

Last night I was uploading webpages and images etc to /home/web/ .
I was using a mixture of Dream weaver, SmartFTP and Filezilla to upload from different PC’s. At one point I was also using 2 users, my personal username and the admin username.

Within doing this I have seemly messed things up. Images won't display and I now I get a, you don't have permission to access this area messages, when I try to browse webpages within sub-directories of /home/web/.

Filezilla tells me that users root, admin, and garyl are all owners of different files within the web directory and the chmod settings for files and folders are all over the place. No consistency at all in regards to permissions.

How can I correct this? Filezilla won't let me chmod some files/folders.
Everything uploaded to /home/web/ is static content. No scripts of any sort. Just basic html pages and images.
JohanSalo
Posts: 23
Joined: 17 Apr 2007, 10:05

Post by JohanSalo »

try the command

chown!
GaryL
Posts: 87
Joined: 04 Sep 2007, 17:40
Location: Northern Ireland

Post by GaryL »

sorry im a linux newbie.

how do I use the command chown.

and what user / user group should /home/web/ be set to?
and what permissions should i set /home/web/ to?
Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek »

Hi

This is probably easiest:
If you can get on the bubba using ssh
switch to the root user and change the ownership of all the files in the /home/web directory to your personal username

Code: Select all

su -
chown -R garyl /home/web/*
GaryL
Posts: 87
Joined: 04 Sep 2007, 17:40
Location: Northern Ireland

Post by GaryL »

although that would probably sort my problems out, would that not cause problems for other users trying to upload to the /home/web/ folder.
should it not be some sort of all users group?
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Hi GaryL

If you are able to log in to bubba via ssh. Become root and do something like:

Code: Select all

cd /home
chown -R root:users web
find web/ -type d -exec chmod 0775 {} \;
find web/ -type f -exec chmod 0664 {} \;
Sorry for not having a nicer solution. I realise that this could look cryptic. But what it does is first changing owner of all files and directories to be owned by root and the group users. The next line changes permissions on all directories and the last one does the same on all files.

I hope this fixes things.

/Tor
Last edited by tor on 10 Jan 2008, 17:09, edited 1 time in total.
Co-founder OpenProducts and Ex Excito Developer
GaryL
Posts: 87
Joined: 04 Sep 2007, 17:40
Location: Northern Ireland

Post by GaryL »

perfect, that fixed it.

many thanks.
Locked