News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Having problems with the package manager?

Started by [Unknown], February 20, 2005, 12:32:26 AM

Previous topic - Next topic

VicViper

OK, so for the time being, can anyone help me get ownership for my files back? I understand that CHMODding stuff yourself through FTP can help installing packages but I apparently "lost" permission to mod my Themes directory courtesy of SMF.

Can the CHOWN command solve this issue? If so, how do I use it - since my FTP software seems to miss this feature ...

Oldiesmann

#401
CHOWN changes the owner of the file. Most FTP clients don't have this. Unfortunately, if you can't even change the file permissions, you probably won't be able to change the ownership of the files.

Try uploading a file with the following code in it to your SMF directory and running it:

<?php
echo shell_exec('chown -R yourusername ./');
?>


That will attempt to make you the owner of all the files and folders in the current directory (and any files/folders in sub-directories...). I don't know if it will work, but it's worth trying anyway.
Michael Eshom
Christian Metal Fans

Bigguy


VicViper

Didn't seem to do anything, unfortunately.

caryb

I had the same problems I had to sudo chown... As I didn't have permissions without elevating my account to change permissions now I can upload packages etc


Cary

Cipriano

I am also having problems, i tryed everything but nothing works. I am using the 1.1 RC3

Morning

Not sure how 'uncompliant" Linux is on these matters, but the UNIX/POSIX compliance says only root may chown (change ownership) of files.

I have generally solved this by having Apache run as user www, and group www. Sites are owned by the user (e.g., foo_user) who is also in group www.

The important setting in UNIX is the 's' (special) bit in the group permissions of the directories. This means that all new fies and directories are automatically created as the group of the directory (in this case group www).

Setting default file mods to rw-rw---- (or 660) for files, and rwxrwx--- (or 770) for directories means that files are created as owned by "apache", but also by group "www". Site 'owners' can still edit their files (tricky part would be making sure others didnt get into site as they would also be able to edit those files, please ignore that for now - unless it is vital to you - send a pm and I'll get back to you on that). btw - the +s setting on directories means that directories are created with the +s setting automatically, so that the structure continues.

My problem with RC3 Package manager is that even when it has rights, it says it doesn't, or it is trying (maybe) to suid (set User ID) when it cant. For installs, I have 'patched' the problem by making the Packages/temp directory manually. However, I have not been able uninstall the one package I have installed. And maybe that is because the package did not install properly ahead of time.

p.s. I am not using Linux, but an "official" UNIX as hosting computer.

青山 素子

#407
I just tested on one of my servers, and I can't even chown a file in my own user directory as a normal user ("Vanilla" Linux and userland tools behave as close as possible to UNIX standards). This is on Slackware 11.0, dunno if other distros patch in the functionality.

The nice thing about this board is you can look at the source in the .php files.

The relevant section:

if (!mktree($boarddir . '/Packages/temp', 0755))
{
  deltree($boarddir . '/Packages/temp', false);
  if (!mktree($boarddir . '/Packages/temp', 0777))
  {
    deltree($boarddir . '/Packages/temp', false);
    packageRequireFTP($scripturl . '?action=packages;sa=' . $_REQUEST['sa'] . ';package=' . $_REQUEST['package'], array($boarddir . '/Packages/temp/delme.tmp'));

    deltree($boarddir . '/Packages/temp', false);
    if (!mktree($boarddir . '/Packages/temp', 0777))
      fatal_lang_error('package_cant_download', false);
  }
}


The numbers are actual mode, not mask. So, first, it tries to create the temp directory with 755, then with 777. If that fails, it pops up the box that asks for FTP info. No suid or anything fancy there. Assuming modes are fine on the files and the mkdir/mktree function isn't disabled, it should work.

What specifically are you seeing when trying to uninstall the package?

Personally, my preference on ownership is to set the apache user as owner, and create a new group for each site. For each user, just put them in the group for each site they have access to. Combine this with a umask of 0007 and it works out fairly well.

What "official" UNIX are you using? AIX? Tru64? Solaris? HP-UX? UnixWare? IRIX?
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Morning

I am using AIX 5.2, and am trying to rebuild rootvg.net to use SMF versus some anyboard thing I inherited. (Current site is www.rootvg.net, try-out is felt-1.demon.nl/jootvg - smf itself is installed as http://felt-1.demon.nl/smf)

The create mode (the 777 above for a directory, and generally 666 for a file is the create mode, this is NAND (0777 & ~umask) to determine the actual bits that the directory or file will be created with. It should not be 'retrying' and skipping the umask - that is the purpose of umask - UserMask.

If you were going to debug you could try to call umask itself, and set the umask to 0. But I would not consider that very neat. I use umask, as do others, with security settings in mind.

Morning

#409
Well, well, well.

Seems there is some cookiechaching, or whatever. I had tried stopping, restartting, clearing private data, etc. etc.

Seems I just needed to wait a few hours.

Nothing was changed, but now rather than an error message about Packages area I get these two pictures:




edit - reinstall reports no errors.





p.s. i tried the image bbc, but that doiesnt seem to work (yet) for me.

J. Williams

Both links are dead, if you have no other modifications installed apart from it; then just replace all files except settings.php with clean ones.
Joshua Jon Williams
Back in Action.

Morning

thank you. seems i forgot /images/ is a magic word in my apache settings.

Morning

well, i am going to blush a bit here, because the bridged version for rootvg, the installer package works fine, however, another 'site', on the same server (so apache, php, mysql, etc are identical) it doesnt work.

The one that did work used to ask for ftp info, but doesnt atm - so that should give you a hint about what is different - i forget what i did for stop that (I will try to see what I can find, but now I am getting the perms problems again.



Morning

the 'site' that is working is owned by apache (i.e. www), the site that was failing is not.

What I expect I must check is the umask settings in httpd.conf and php.ini as well as system default. What I could see is that apache or php was making new files and the owner was 'www', or apache.

running chown -R www:www 'site' did not resolve the problem though. Still getting the big read error message.

Suggestions. Now I am a bit stuck.

Morning

And a bit lucky - after doing the chown - and it should work, i went to deinstall, and that worked, and after reinstall, the mod works too!

happy me!

bebe

Not sure if this is the correct place to ask this question.

I always get the following 2 errors in the forum log whenever i go to Packages-->Download Packages-->Browse (http:// yoururl.com/forum/index.php?action=packageget;sa=browse;server=1).

8: Undefined index: email
File: /home/youraccount/public_html/forum/Sources/PackageGet.php
Line: 415


8: Undefined index: link
File: /home/youraccount/public_html/forum/Themes/default/Packages.template.php (eval?)
Line: 824


Anybody know what is the cause and how should i correct it?

bebe

I had a check. Would it be possible causing by the following?
The Simple Blog mod's Author field is blank so there is no email link present.

Please. I hate to see any error present in the log. :(

babanner

This is what i get:
Fatal error: require() [function.require]: Failed opening required '/www/110mb.com/w/w/n/_/_/_/_/_/wwn/htdocs/news/Packages/temp/./install.php' (include_path='.:/usr/share/php') in /www/110mb.com/w/w/n/_/_/_/_/_/wwn/htdocs/news/Sources/Packages.php on line 540

What the problem could be?

J. Williams

Safe mode would be the first explanation whilst chmodding might be my next.
Joshua Jon Williams
Back in Action.

same33

I've tried everything thing ppl have here posted and nothing helps...

Can't add mods  >:(    everytime the ftp info screen pops up and when i feed the needed (ftp host, password and username) it just pops up again... and I'm 100000% sure that all info is correct.
I've installed the forum twice without any difference..  I'm getting really pissed with this bug or what ever is...   Aren't there really anything to do to fix this stopid bug?   or do i really switch to some other forum software :(      argh  plz tell if there is anything to do..

Advertisement: