TinyPortal

General => Chit chat => Topic started by: Paulie on February 21, 2006, 05:12:12 PM

Title: Problem chmod ing smf default theme copy
Post by: Paulie on February 21, 2006, 05:12:12 PM
Ok i cant fathom out as to why i cant chmod a copy of the smf default theme (RC2 and TP 0.8) For some reason it wont let me upload/change any images even though the new theme directory is in place.

Is there a sneaky bit of code somewhere that wont let me chmod?

Any brainstorming would be nice.
Title: Re: Problem chmod ing smf default theme copy
Post by: bloc on February 21, 2006, 05:36:32 PM
Using cpanel's file manager usually does the trick. If you have that of course.
Title: Re: Problem chmod ing smf default theme copy
Post by: Paulie on February 21, 2006, 05:41:29 PM
Thats what i normally use. But when i change permissions to 777 it just wont accept the new images. I tend to do most of my bodging in c-panel ;)
Title: Re: Problem chmod ing smf default theme copy
Post by: redeye on February 21, 2006, 06:23:27 PM
This seems to be a common problem with SMF.

Any themes created (copies, etc) directly through SMF cause the directories to get "locked" and you get an error "bad file descriptor", essentially you don't "own" the rights thro' FTP to edit the directory.
The only way I have been told it can be fixed is using the root command CHOWN.
Title: Re: Problem chmod ing smf default theme copy
Post by: Paulie on February 21, 2006, 06:26:18 PM
Oooh bugger that lol, far too scarey ;) Thanks for taking time to reply though.
Title: Re: Problem chmod ing smf default theme copy
Post by: elpvn on February 21, 2006, 06:27:14 PM
Try again with CHMOD 775 will be better, why not ?Ã,  ;)

P/S: Don't CMOD 777 with parents folder (root) has index.php files contain there, it's will appear ERROR right now ! never, right !
Title: Re: Problem chmod ing smf default theme copy
Post by: Paulie on February 21, 2006, 06:46:17 PM
I`m just checking with my hosts as to weather it`s a c-panel problem their side. I cant chmod anything at the moment, even my own theme.
Title: Re: Problem chmod ing smf default theme copy
Post by: elpvn on February 21, 2006, 06:57:24 PM
Oh ! my bad.  ;D
Title: Re: Problem chmod ing smf default theme copy
Post by: IchBin on February 21, 2006, 09:18:39 PM
This happens when you don't "own" the files or folders. It happens on linux servers that aren't setup properly. The only thing you can do is call your host and tell them to fix it. Unless you have console access, then you can do it yourself. :)
Title: Re: Problem chmod ing smf default theme copy
Post by: Paulie on February 21, 2006, 11:13:23 PM
They have actually just moved servers back to the UK from America due to db problems lol, so maybe it`s a setup problem their side. I`m waiting to hear back from them.
Title: Re: Problem chmod ing smf default theme copy
Post by: Paulie on February 22, 2006, 10:20:46 AM
Ok i think i`ve found the problem. For some unknown reason when you install a new theme from the default, you cant modify it. But you can modify the default itself. Wierd or what lol.
Title: Re: Problem chmod ing smf default theme copy
Post by: crip on February 22, 2006, 10:31:15 AM
I love cookies.. ;)
Title: Re: Problem chmod ing smf default theme copy
Post by: IchBin on February 23, 2006, 06:01:02 AM
Once again, this is a permissions problem. Because of the way the server is setup, anytime you have SMF copy or move files it sets the permissions on the files so that you don't own them. Thus, making it so that you can't edit them.
Title: Re: Problem chmod ing smf default theme copy
Post by: borgBOB on February 23, 2006, 06:09:28 AM
Quote from: ÂÃ,»cripÂÃ,« on February 22, 2006, 10:31:15 AM
I love cookies.. ;)

Time to feed crip.
Title: Re: Problem chmod ing smf default theme copy
Post by: Amay_Zing on March 18, 2006, 01:28:22 PM
I was told by my host that it was the way that the php files were uploaded to the server by the smf manager - thats why they are owned by "nobody" and thats why I can't change the CHMOD on some things.  This is confusing
Title: Re: Problem chmod ing smf default theme copy
Post by: Crip on March 18, 2006, 01:41:59 PM
command line files to CHMOD (777) (644) (755).. other words (force) them to CHMOD..never fails :)
Title: Re: Problem chmod ing smf default theme copy
Post by: IchBin on March 18, 2006, 05:58:44 PM
Quote from: Amay_Zing on March 18, 2006, 01:28:22 PM
I was told by my host that it was the way that the php files were uploaded to the server by the smf manager - thats why they are owned by "nobody" and thats why I can't change the CHMOD on some things.  This is confusing
This is something I just asked over at SMF. The problem is when SMF uploads and files/packages/themes etc. it uses the apache user name and group for the file owner. Often hosts run apache as the user nobody and the group nobody. So, the files are literally owned by someone named nobody. This makes it so you can't alter/delete any of the files owned by "nobody"...

I just asked at SMF if there is a way possible to fix this. I'll report back here if I get any good info.
Title: Re: Problem chmod ing smf default theme copy
Post by: Amay_Zing on March 18, 2006, 09:53:50 PM
Yes thats exactly what my host said - Cool thanks IchBin 
Title: Re: Problem chmod ing smf default theme copy
Post by: TwinsX2Dad on March 18, 2006, 10:20:31 PM
In this day and age of GUIs and XY input devices (your mouse), many never learn UNIX commands - yet for the most part, your Web site runs on a variation of UNIX.

It is a very easy fix, IF you have shell access and PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/) (Telnet/SSH client) or something similar.

Access the folder, then enter the chown (change owner) syntax as follows:

chown [-R] newowner filenames

Where:

-R
Change the permission on files that are in the subdirectories of the directory that you are currently in.

newowner
The alias/username of the new file owner.

filenames
The file(s) you need to change the rights to.

Example:

To give permissions as owner to user tinyport for the file smftheme.txt, you would enter:

chown tinyport smftheme.txt

It is extremely simple to accomplish. If you need to change more than one file, you could do it by entering:

chown tinyport smftheme1.txt smftheme2.txt smftheme3.txt
Title: Re: Problem chmod ing smf default theme copy
Post by: gerrymo on March 18, 2006, 10:32:52 PM
I'm quite lucky there. I dont have cPanel. My hosts have their own control panel that has an option to change ownership of files. It was a nightmare getting rid of phpnuke until I discovered it and worked out what to do.
Title: Re: Problem chmod ing smf default theme copy
Post by: TwinsX2Dad on March 18, 2006, 10:55:49 PM
Quote from: gerrymo on March 18, 2006, 10:32:52 PM
I'm quite lucky there. I dont have cPanel. My hosts have their own control panel that has an option to change ownership of files. It was a nightmare getting rid of phpnuke until I discovered it and worked out what to do.

Shell access and CPanel aren't mutually exclusive. On my servers, I have shell access on all - yet also have Plesk on one and CPanel on the rest. In some cases, you just have to ask for shell access. Even if it is available, most hosts don't include it in their default setups, so you do need to request it. There generally is no extra charge for it - they just don't want to open it for the 99% of users who haven't a clue as to why it is there, and will never use it. So my little tutorial above could still help a lot of folks.

Dreamweaver and FrontPage have contributed to a general dumbing down of the Internet population by making it so anyone can get online.
Title: Re: Problem chmod ing smf default theme copy
Post by: gerrymo on March 18, 2006, 11:09:44 PM
Quote from: TwinsX2Dad on March 18, 2006, 10:55:49 PM
quote]
So my little tutorial above could still help a lot of folks.

It will help a lot of people. It seems ownership causes a lot of problems with SMF and sometimes with TP, so it will be handy for many.
Title: Re: Problem chmod ing smf default theme copy
Post by: gerrymo on March 18, 2006, 11:14:35 PM
Perhaps we should have a board just for tutorials, with Admin/Mods only to post. Then each one posted could be moved there, and not end up getting jammed up with replies. A "Read Only" board for tutorials such as your one.
Title: Re: Problem chmod ing smf default theme copy
Post by: TwinsX2Dad on March 19, 2006, 01:19:42 AM
I think that would be a great idea - there are so many downsides to having to search for certain items, especially within SMF. The search function is one of the weak points in this software and, when you do find something, you often have to read through each post in a large thread.