Problem with saving conf files (e.x. config.php)

Discussion in 'General' started by baskin, Oct 9, 2009.

  1. baskin

    baskin Member

    I have a strange problem. Every time i try to save a conf file, for example configuration.php on a joomla install, a new file is created with .1 at the end instead of overwriting the original file.

    If i try to save again a .2 file appears and so on.

    Saving is done within the joomla admin interface. I also have the same problem with other cms software.

    It seems that on my installation for some reason a copy (with the changes) of the original file is created (with .1, .2, .3 extensions) instead of overwriting the original file.

    I'm on Opensuse 11.1 with ISPconfig 3 (latest version).
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which editor do you use to edit the files? Do you edit them on the shell or by FTP?
     
  3. baskin

    baskin Member

    When I edit from the shell i have no problem and i never edit through FTP.

    The problem is when i want to save changes through the administration interface (for example of joomla).

    Through the admin interface of joomla you can change some parameters of the main configuration.php file on the fly (and with a easier way) without the need to edit the file from the shell. The same happens with templates parameters file (params.ini) that is also editable through the admin section of joomla.
     
  4. baskin

    baskin Member

    I think that joomla (and others) use the ftp account for writing files, so maybe this is the right answer for your question.
     
  5. baskin

    baskin Member

    Any hint on this?

    I still have this problem on a newly created site.
     
  6. Doug G

    Doug G Member HowtoForge Supporter

    If you want a guess, you may need to adjust permissions on the config file to allow the web server to write to the file.
     
  7. baskin

    baskin Member

    The problem appears when the ftp user tries to edit a file. Permissions are ok.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Login as root into the server and post the output of:

    ls -la

    from inside the web directory
     
  9. baskin

    baskin Member

    Here it is the requested info:

    Code:
    /web # ls -la                                                                                       
    total 280                                                                                                                       
    drwxr-xr-x 18 web11 client1  4096 2010-02-23 00:48 .                                                                            
    drwxr-xr-x  6 root  root     4096 2009-12-18 21:07 ..                                                                           
    drwxr-xr-x 11 web11 client1  4096 2010-02-23 00:20 administrator                                                                
    drwxrwxrwx  4 web11 client1  4096 2010-02-23 01:05 cache                                                                        
    -rw-r--r--  1 web11 client1 97981 2010-02-23 00:20 CHANGELOG.php                                                                
    drwxrwxrwx 13 web11 client1  4096 2010-02-23 00:21 components                                                                   
    -rw-rw-rw-  1 web11 client1  1685 2010-02-23 01:07 configuration.php                                                            
    -rw-r--r--  1 web11 client1  3409 2010-02-23 00:21 configuration.php-dist                                                       
    -rw-r--r--  1 web11 client1  1175 2010-02-23 00:20 COPYRIGHT.php                                                                
    -rw-r--r--  1 web11 client1 14894 2010-02-23 00:20 CREDITS.php
    drwxr-xr-x  2 web11 client1  4096 2009-12-18 20:51 error
    -rwxr-xr--  1 web11 client1  1406 2009-12-18 20:51 favicon.ico
    -rw-r--r--  1 web11 client1  2771 2010-02-23 00:21 .htaccess
    -rwxr-xr--  1 web11 client1     0 2009-12-18 20:51 .htaccess.original
    drwxrwxrwx  6 web11 client1  4096 2010-02-23 00:21 images
    drwxr-xr-x  8 web11 client1  4096 2010-02-23 00:21 includes
    -rw-r--r--  1 web11 client1   591 2010-02-23 00:21 index2.php
    -rwxr-xr--  1 web11 client1  1861 2009-12-18 20:51 index.html.original
    -rw-r--r--  1 web11 client1  2052 2010-02-23 00:21 index.php
    -rw-r--r--  1 web11 client1  4344 2010-02-23 00:20 INSTALL.php
    drwxrwxrwx  5 web11 client1  4096 2010-02-23 01:01 language
    drwxr-xr-x 16 web11 client1  4096 2010-02-23 00:21 libraries
    -rw-r--r--  1 web11 client1 17816 2010-02-23 00:20 LICENSE.php
    -rw-r--r--  1 web11 client1 27984 2010-02-23 00:20 LICENSES.php
    drwxrwxrwx  2 web11 client1  4096 2010-02-23 00:22 logs
    drwxrwxrwx  3 web11 client1  4096 2010-02-23 00:22 media
    drwxrwxrwx 22 web11 client1  4096 2010-02-23 00:22 modules
    drwxrwxrwx 11 web11 client1  4096 2010-02-23 00:22 plugins
    -rwxr-xr--  1 web11 client1   304 2010-02-23 00:23 robots.txt
    drwxr-xr-x  2 root  root     4096 2010-02-24 00:30 stats
    drwxrwxrwx  6 web11 client1  4096 2010-02-23 00:23 templates
    drwxrwxrwx  2 web11 client1  4096 2010-02-23 01:07 tmp
    drwxr-xr-x  4 web11 client1  4096 2010-02-23 00:23 xmlrpc
    Keep in mind that it is a newly created web site. Only joomla files are copied (through ssh) and joomla is installed.

    Thanks.
     
    Last edited: Feb 24, 2010
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. Now please create a FTP user and use a external FTP clint like the FireFTP firefox plugin to connect to the site, donload CHANGELOG.php php to your workstation and edit a line in it and the upload iat again into the webspace. Does it work and if not, post the exact error messages from fireftp.
     
  11. baskin

    baskin Member

    Exact same behavior. The file is uploaded (FireFTP asks to overwrite it and i answered yes), but a new file with extension .1 is created instead of overwriting the old file.

    Code:
    /web # ls -la            
    total 380                                            
    drwxr-xr-x 18 web11 client1  4096 2010-02-24 11:59 . 
    drwxr-xr-x  6 root  root     4096 2009-12-18 21:07 ..
    drwxr-xr-x 11 web11 client1  4096 2010-02-23 00:20 administrator
    drwxrwxrwx  4 web11 client1  4096 2010-02-23 01:05 cache        
    -rw-r--r--  1 web11 client1 97981 2010-02-23 00:20 CHANGELOG.php
    -rw-------  1 web11 client1 97991 2010-02-24 11:59 CHANGELOG.php.1
    drwxrwxrwx 13 web11 client1  4096 2010-02-23 00:21 components     
    -rw-rw-rw-  1 web11 client1  1685 2010-02-23 01:07 configuration.php
    -rw-r--r--  1 web11 client1  3409 2010-02-23 00:21 configuration.php-dist
    -rw-r--r--  1 web11 client1  1175 2010-02-23 00:20 COPYRIGHT.php
    -rw-r--r--  1 web11 client1 14894 2010-02-23 00:20 CREDITS.php
    drwxr-xr-x  2 web11 client1  4096 2009-12-18 20:51 error
    -rwxr-xr--  1 web11 client1  1406 2009-12-18 20:51 favicon.ico
    -rw-r--r--  1 web11 client1  2771 2010-02-23 00:21 .htaccess
    -rwxr-xr--  1 web11 client1     0 2009-12-18 20:51 .htaccess.original
    drwxrwxrwx  6 web11 client1  4096 2010-02-23 00:21 images
    drwxr-xr-x  8 web11 client1  4096 2010-02-23 00:21 includes
    -rw-r--r--  1 web11 client1   591 2010-02-23 00:21 index2.php
    -rwxr-xr--  1 web11 client1  1861 2009-12-18 20:51 index.html.original
    -rw-r--r--  1 web11 client1  2052 2010-02-23 00:21 index.php
    -rw-r--r--  1 web11 client1  4344 2010-02-23 00:20 INSTALL.php
    drwxrwxrwx  5 web11 client1  4096 2010-02-23 01:01 language
    drwxr-xr-x 16 web11 client1  4096 2010-02-23 00:21 libraries
    -rw-r--r--  1 web11 client1 17816 2010-02-23 00:20 LICENSE.php
    -rw-r--r--  1 web11 client1 27984 2010-02-23 00:20 LICENSES.php
    drwxrwxrwx  2 web11 client1  4096 2010-02-23 00:22 logs
    drwxrwxrwx  3 web11 client1  4096 2010-02-23 00:22 media
    drwxrwxrwx 22 web11 client1  4096 2010-02-23 00:22 modules
    drwxrwxrwx 11 web11 client1  4096 2010-02-23 00:22 plugins
    -rwxr-xr--  1 web11 client1   304 2010-02-23 00:23 robots.txt
    drwxr-xr-x  2 root  root     4096 2010-02-24 00:30 stats
    drwxrwxrwx  6 web11 client1  4096 2010-02-23 00:23 templates
    drwxrwxrwx  2 web11 client1  4096 2010-02-23 01:07 tmp
    drwxr-xr-x  4 web11 client1  4096 2010-02-23 00:23 xmlrpc
    No errors on FireFTP.

    Code:
    227 Entering Passive Mode (10,215,0,125,225,143)
           STOR CHANGELOG.php
    150 Accepted data connection
    226-File successfully transferred
    226 0.097 seconds (measured here), 0.96 Mbytes per second
           TYPE A
    200 TYPE is now ASCII
           PASV
    227 Entering Passive Mode (10,215,0,125,201,8)
           MLSD
    150 Accepted data connection
    226-Options: -a -l
    226 34 matches total
           NOOP
    200 dc.w $4E71
           NOOP
    200 dc.w $4E71
           NOOP
    200 dc.w $4E71
    I have the same behavior with Filezilla as well. Only with ssh user i am able to overwrite files.

    Thanks
     
    Last edited: Feb 24, 2010

Share This Page