i can't access (delete.modify or download) my file on ubuntu azure vm

Nerdy Learner 0 Reputation points
2023-05-31T08:49:07.74+00:00

Dear Azure Support Team,

I hope this message finds you well. I am writing to seek assistance with an issue I am facing while trying to modify files on my Azure VM using SFTP. I have tried different software such as Termius and WinSCP, but I encounter the following error:

Error: EPERM operation not permitted.

The problem persists even when I attempt to download files from the VM to my local storage.

Here are some additional details that might be helpful in troubleshooting the issue:

  • SFTP Client Details:
    • Software Used:Termius, WinSCP
    • Connection Method: username/password
  • Steps Taken:
  • I have verified that the provided username and password are correct and can successfully log in to the VM using other methods (e.g., RDP).
  • I have attempted to modify files in different directories on the VM, but the error remains consistent.
  • I have also tried downloading files from the VM to my local storage, but the same error occurs.

Kind regards,

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,524 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 42,066 Reputation points
    2023-05-31T10:15:29.0633333+00:00

    Hi Nerdy,

    Did you tried the SCP process? Check out this detailed step by step guide over here - https://learn.microsoft.com/en-us/azure/virtual-machines/copy-files-to-vm-using-scp


  2. vipullag-MSFT 25,861 Reputation points
    2023-06-01T02:45:41.3433333+00:00

    Hello Nerdy Learner

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Just checking in to see if you got a chance to see previous response from Jimmy. Try the suggestion shared by Jimmy.
    Adding few more troubleshooting steps, this error usually occurs when the user account you are using to access the files does not have the necessary permissions to perform the operation.

    To resolve this issue, you can try the following:

    -Check the permissions of the files and directories you are trying to modify. You can use the ls -l command to view the permissions of the files and directories. Make sure that the user account you are using to access the files has the necessary permissions to modify them.

    -If you are using a non-root user account to access the files, make sure that the user account has the necessary permissions to modify the files. You can use the sudo command to run commands with elevated privileges.

    -Check the ownership of the files and directories you are trying to modify. You can use the ls -l command to view the ownership of the files and directories.

    -If you are still facing issues, you can try modifying the permissions of the files and directories using the chmod command. For example, you can use the following command to give the user account you are using to access the files read, write, and execute permissions on a file:

    chmod u+rwx filename
    

    You can also use the chown command to change the ownership of the files and directories. For example, you can use the following command to change the ownership of a file to a specific user:

    chown username filename
    

    I hope this helps.