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

Fails silently if backup file can't be created ([input_file]~) #53

Open
jpenney opened this issue Jan 3, 2018 · 1 comment
Open

Fails silently if backup file can't be created ([input_file]~) #53

jpenney opened this issue Jan 3, 2018 · 1 comment

Comments

@jpenney
Copy link

jpenney commented Jan 3, 2018

If the user has permission to edit the file, but not to create new files in the same to the directory, saving fails silently (unless verbose is used).

$ ls -la 
total 0
drwxr-xr-x   3 root        wheel  102 Jan  3 09:22 .
drwxrwxrwt  19 root        wheel  646 Jan  3 09:22 ..
-rw-r--r--   1 sampleuser  wheel    0 Jan  3 09:22 test_file.txt

Open the file for editing:

$ rmate --host samplehost --wait test_file.txt

Make some changes, and save the file, close the tab, and the file is still empty:

$ cat test_file.txt

Repeat the above with --verbose:

$ rmate --host samplehost --wait --verbose test_file.txt 
Using TCP socket to connect: ‘samplehost:52698’
Connect: ‘220 samplehost RMATE TextMate (Darwin 15.6.0)’
Saving test_file.txt
Save failed! Permission denied - test_file.txt~
Closed test_file.txt
Done
@squishbug
Copy link

I've been experiencing a very similar problem. Thank you for your post with the --wait and --verbose options! My files were just disappearing, and I couldn't figure out why!

$ls -l
-rwxrwxr-x 1 bfletcher bfletcher     0 Aug 22 11:20 temp_file.py

Error with $rmate --view --wait temp_file.py:

touch: cannot touch ‘/tmp/rmate.11068.90017’: Permission denied
/usr/local/bin/rmate: line 362: /tmp/rmate.11068.90017: Permission denied
Saving temp_file.py
cat: /tmp/rmate.11068.90017: No such file or directory
rm: cannot remove ‘/tmp/rmate.11068.90017’: No such file or directory

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

2 participants