DataPaymentNet [26/7/23 Testnet] [Offline]

Hmm, so what is going on here? You have Linux installed on a mac?

Yeah, it’s not surprising that a new temporary directory is created for each installation run, because that’s what the install does during the process.

Your user should have permission to write to those directories, as indicated by the permissions assigned.

1 Like

Yes. It’s being repurposed after a bad hard drive.

It’s legitimate for any user to be able to use the temporary space the operating system makes available. The /tmp directory is setup with permissions for any user to write to, and that’s why things like mktemp are available.

3 Likes

I understand that’s how it should work … but … :laughing:

What happens if you just try this command manually?

curl -L https://github.com/maidsafe/safeup/releases/download/v0.4.0/safeup-0.4.0-x86_64-unknown-linux-musl.zip -o /tmp/tmp.6KHW0Mv345/safeup.tar.gz

I’m using the output location there as one of the temporary directories that was created.

david@david-Macmini:/home$ curl -L https://github.com/maidsafe/safeup/releases/download/v0.4.0/safeup-0.4.0-x86_64-unknown-linux-musl.zip -o /tmp/tmp.6KHW0Mv345/safeup.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Warning: Failed to open the file /tmp/tmp.6KHW0Mv345/safeup.tar.gz: No such 
Warning: file or directory
  0 4129k    0  7969    0     0   8167      0  0:08:37 --:--:--  0:08:37  8167
curl: (23) Failure writing output to destination
david@david-Macmini:/home$ 

This is a brand new install of Ubuntu and I left everything defaults during the install.

Hmm, you have something quite odd going on here in your OS setup.

What happens if you just try and write a simple text file in /tmp/tmp.6KHW0Mv345? Or just use touch to create a file in there?

1 Like

david@david-Macmini:/home$ cd /tmp/tmp.6KHW0Mv345
david@david-Macmini:/tmp/tmp.6KHW0Mv345$ touch makefile
david@david-Macmini:/tmp/tmp.6KHW0Mv345$ ls
makefile
david@david-Macmini:/tmp/tmp.6KHW0Mv345$

curl -L https://github.com/maidsafe/safeup/releases/download/v0.4.0/safeup-0.4.0-x86_64-unknown-linux-musl.zip -o ~/safeup.tar.gz

What happens when you try to save it to your home folder? Try the above - I edited it.

Think i’m good now to move to the next setup?

avid@david-Macmini:/home$ curl -L https://github.com/maidsafe/safeup/releases/download/v0.4.0/safeup-0.4.0-x86_64-unknown-linux-musl.zip -o ~/safeup.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 4129k  100 4129k    0     0  4333k      0 --:--:-- --:--:-- --:--:-- 4333k

Thanks @TylerAbeoJordan!

3 Likes

That doesn’t really explain much about why you’re being denied access to that temporary directory. But if you like, you can manually extract the archive and put the safeup binary under ~/.local/bin and modify your PATH so that location is on there (which is what the rest of the install script would have done).

2 Likes

Just out of curiosity, what if you try to write a text file with some contents, rather than just a 0 byte file?

david@david-Macmini:/home$ cd /tmp/tmp.6KHW0Mv345
david@david-Macmini:/tmp/tmp.6KHW0Mv345$ echo ‘This is a test’ > data.txt
david@david-Macmini:/tmp/tmp.6KHW0Mv345$ ls -lah
total 12K
drwx------ 2 david david 4.0K Aug 2 20:01 .
drwxrwxrwt 28 root root 4.0K Aug 2 19:46 …
-rw-rw-r-- 1 david david 15 Aug 2 20:01 data.txt
-rw-rw-r-- 1 david david 0 Aug 2 19:50 makefile
david@david-Macmini:/tmp/tmp.6KHW0Mv345$

1 Like

It’s Ubuntu, mystery solved. :rofl:

Hmm, sorry, but I can’t account for why the curl process would not also be able to write a file there.

I need to download this file, extract it and do the rest?

Jumped the gun. I see safeup now!

Can you just use the script ?

Just grab it from there, put it in a file - change the temp dir to your home dir (line 103), save it, make it executable, and run.

e.g. change line 103:
temp_dir=“/home/upstate”

temp_dir=$(mktemp -d)

To this?
HOME=(mktemp -d)

Sorry i’ve not messed with scripting and I forget things to quickly.

1 Like

temp_dir=“/home/upstate”

or whatever your home user folder is called.

1 Like

oh efff, don’t do that! I was really wrong!

I’m probably too late and I’ve made you delete your home folder … I’m running on no sleep in 24 hours - I shouldn’t be giving driving lessons now.

Get rid of line 108 and you’ll be okay. Unless you’ve already done it, in which case you probably want to kill me.