I did a fresh install of Ubuntu 20.04 today.
I got as far as setting up my vim environment which installs plug.vim using curl when I hit a speed bump.
Error creating directory /home/simon/.vim/autoload.
curl: (23) Failed writing received data to disk/application
The relevant lines in the .vimrc are:
" Auto-install plugin manager if it doesnt exist (and PlugInstall)
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
Trying to isolate the problem, it seems like I can't use a path with a dot file in it as an output for curl.
eg. This fails:
➜ ~ curl -fLo ~/.test_dot_folder/test.py --create-dirs example.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file /home/simon/.test_dot_folder/test.py: No
Warning: such file or directory
100 1256 100 1256 0 0 2800 0 --:--:-- --:--:-- --:--:-- 2803
curl: (23) Failure writing output to destination
But this works:
➜ ~ curl -fLo ~/test_dot_folder/test.py --create-dirs example.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1256 100 1256 0 0 2659 0 --:--:-- --:--:-- --:--:-- 2661
➜ ~
The only difference is the .
in front of the folder.
Even when I do
mkdir .test_dot_folder
and then run the first curl command, it still fails.
If you're wondering about permissions in the directory:
Here's what happens when I run @waltinator's pathlld
script on my home directory.
➜ ~ sudo code/pathlld.sh -v .
drwxr-xr-x 22 simon simon 4096 Aug 7 20:15 .
/dev/nvme0n1p5 on / type ext4 (rw,relatime,errors=remount-ro)
Any suggestions as to what's going wrong?