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

Permission denied when attempting to delete /tmp/shmig-migration-error.xxx.tmp #65

Open
hi-bella opened this issue Oct 26, 2020 · 5 comments

Comments

@hi-bella
Copy link

Hi all, I'm having an issue when try to shmig up/down in my server and got an error message like this

/usr/local/bin/shmig: line 607: /tmp/shmig-migration-error.10521.tmp: Permission denied
error

what is the proper way to delete this temporary file ? Thank you.

@hi-bella hi-bella changed the title Permission denied when attempting to delete /tmp/shmig-migration-error.12123.tmp Permission denied when attempting to delete /tmp/shmig-migration-error.xxx.tmp Oct 26, 2020
@mbucc
Copy link
Owner

mbucc commented Oct 26, 2020

Hi,

Can you tell me

  1. How you ran shmig?
  2. The output of:
    $ ls -l /tmp/shmig-migration-error.10521.tmp

@hi-bella
Copy link
Author

hi-bella commented Oct 26, 2020

  1. I ran shmig with command shmig up for create the table and shmig down for drop table. The shmig are in /usr/local/bin. I ran the shmig command with another user in the server (not root)
  2. This is the output:
-rw-r--r-- 1 root root 0 Aug  4 09:34 /tmp/shmig-migration-error.10521.tmp

@mbucc
Copy link
Owner

mbucc commented Oct 31, 2020

Hi,

Somehow, you ran shmig as root. So you need to become the root user to remove that file.

@ivanruslimcdohl
Copy link

ivanruslimcdohl commented Nov 23, 2020

I've encountered the same issue.
So i'm trying to run shmig in jenkins, in my case the user is jenkins and it sometimes failed in the process of shmig up or shmig down

so is there any way to be able to do it without being root ? thankyou

@mbucc
Copy link
Owner

mbucc commented Dec 18, 2020

yes, shmig runs fine as non-root user.

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

3 participants