Joseph Padgett <[email protected]> writes: > Hello,
Hi Joseph, > I posted about this issue on StackExchange and someone suggested > contacting this email address. That was me :-) > The problem I am having occurs when I try to save with privileges. I > use sudo within emacs to open dired, and from there I open a file I > would like to edit. In this case it is a config file on my Raspberry > Pi in (/boot/config.txt). I've tried other files and met with the > same problem though. I've done this numerous times over the past > several months since I started using Emacs without issue. Then the > problem began to occur a week or two ago. I can't think of anything > that I change as far as configurations, versions, packages, .init.el, > etc. So not sure why the sudden onset of the problem. > > At any rate, once I go to save the file after I have made my edits, I > get a message that says > > "Copying directly failed, see buffer 'tramp/sudo root@HOST' for > details" According to the traces, the following command has failed: --8<---------------cut here---------------start------------->8--- > 14:08:30.692841 tramp-send-command (6) # cp -f -p /tmp/tramp.BYNKsB.txt > /boot/config.txt 2>/dev/null; echo tramp_exit_status $? > 14:08:30.699549 tramp-wait-for-regexp (6) # > tramp_exit_status 1 > ///61a702f61196b13e60aff1a64131181e#$ --8<---------------cut here---------------end--------------->8--- stderr has redirected, so we don't know the error message. Perhaps we can try to see what's up by: --8<---------------cut here---------------start------------->8--- # As your local user, create a test file echo foo >/tmp/tramp.BYNKsB.txt # Show its permissions ls -l /tmp/tramp.BYNKsB.txt # As root user, mimic Tramp's action sudo /bin/sh -i # Save the file in question cp -p /boot/config.txt /boot/config.txt.sv # Apply Tramp's command cp -f -p /tmp/tramp.BYNKsB.txt /boot/config.txt; echo tramp_exit_status $? # Restore the file mv /boot/config.txt.sv /boot/config.txt --8<---------------cut here---------------end--------------->8--- And pls show the output of these commands. Best regards, Michael.
