Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sk.php is not be created during upgrade #274

Closed
Raboo opened this issue Feb 10, 2013 · 15 comments
Closed

sk.php is not be created during upgrade #274

Raboo opened this issue Feb 10, 2013 · 15 comments

Comments

@Raboo
Copy link

Raboo commented Feb 10, 2013

Downloaded the current master today to upgrade my old install that didn't have a sk file..

$sk_file could not be created. Please check the path and the rights.

Even if the webbserver has write permissions to that directory it fails.

@nilsteampassnet
Copy link
Owner

Hi

Can you give me the path to your sk.php file to see what you entered?
Have you tried to reupload all files and restart the upgrade?

My suggestion when upgrading is to rename your old TP folder and upload the new package into an empty TP folder.
Then copy files from old folders "upload", "files" and "backups".
Copy also settings.php file into "/includes".

Start upgrading.

@galoagui
Copy link

hi,

i have the same problem.
what file is $sk_file?

@timefuser-zz
Copy link

Hi!

I have the same problem with 2.1.15, even when I clean the old teampass folder before!

@team-codamigo
Copy link

I have exactly the same problem, my upgrade is stucked...no way to go further (see attached file)
As I understand :
-leaving the field blank
-setting a path like /etc/teampass with proper write rights

...should work in both case, no ?

I confirm that /teampass/includes is 777 chmoded...

Please help ! ;-)

ScreenShot082

@galoagui
Copy link

galoagui commented Mar 1, 2013

I fixed the problem reinstalling everythig.

@Melbosa
Copy link

Melbosa commented Mar 4, 2013

I too have the same issue. Upgrade cannot create the file... even if I choose a CHMOD 777 Directory on my server. I am running CentOS 6, Teampass version 2.1.12 going to version 2.1.16.

@pjoakimsson
Copy link

Check that you don't have any escaped characters in include/settings.php. I.e. my config.php had $smtp_auth = ''false'' to work around previous problems and after changing it to $smtp_auth = 'false' it worked much better.

@Melbosa
Copy link

Melbosa commented Mar 12, 2013

I have checked for what you suggest, but it is not in our settings.php. Only the DB password has escaped characters in it, and there isn't an $smtp_auth variable set. Here is our settings.php file (**** used to replace private content):

NeverChange it once it has been used !!!!! ### DATABASE connexion parameters $server = "teampass.***_.local"; $user = "teampass_admin"; $pass = "**_*******_"; $database = "**_*_teampass"; $pre = "teampass_"; @date_default_timezone_set($_SESSION['settings']['timezone']); ?>

@pjoakimsson
Copy link

If you tried to upgrade already, the settings.php you are looking at is the new "upgraded" file. In include directory there should be an backup'ed file with the old settings in that case. Remeber to replace the new file with the old if you are rerunning the upgrade.

@Melbosa
Copy link

Melbosa commented Mar 18, 2013

I have my TeamPass in a VM, so I was able to roll back to 2.1.12 every time it failed. The settings.php are from the 2.1.12 install.

@Melbosa
Copy link

Melbosa commented Apr 8, 2013

Anyone have any suggestions here? I really don't want to rebuild my TeamPass from scratch and then move my passwords to it...

@nilsteampassnet
Copy link
Owner

I don't understand ... if you have the orignal 2.1.12 settings.php file and a backup of DB, then no problem.

What is your actual situation? what is the error you get?

@Melbosa
Copy link

Melbosa commented Apr 9, 2013

If I go through the upgrade process and get to the generate $sk_file, and give it an absolute path to a directory it will not create the file. Just get the error as shown in team-codamigo comment above.

@nilsteampassnet
Copy link
Owner

Have you checked this issue #318

@pjoakimsson
Copy link

Tried to do an upgrade today and got this again, and decided to follow it up. I think the problem is in upgrade_ajax.php:

                //Check if path is ok
                if (is_dir($securePath)) {
                    if (is_writable(dirname($securePath))) {

as php manual says:

Given a string containing the path of a file or directory, this function will return the parent directory's path.

If you give a path, f. ex. /var/lib/teampass, its parent directory is /var/lib (i.e. php doesn't know if it's a file or an directory) and you run into the issue that the it's not writable regardless what permissions you give /var/lib/teampass.

It might be possible if you add a "/" at the end, but it's less error prone to change the code as below:

                //Check if path is ok
                if (is_dir($securePath)) {
                    if (is_writable(dirname($sk_file))) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants