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

schemamgr temp file chmod perms too restrictive umask #2

Open
markhu opened this issue Jan 9, 2014 · 0 comments
Open

schemamgr temp file chmod perms too restrictive umask #2

markhu opened this issue Jan 9, 2014 · 0 comments

Comments

@markhu
Copy link

markhu commented Jan 9, 2014

When you run schemamgr.pl , it outputs temp files with the permissions of you, the current user --which is fine until you run it as someone else, then it totally breaks.

The temp files either need deletion, or world-writeable/deletable permissions set, or a time-stamp added to the filename or PID stamp using the $$ pseudo-variable.

Here's what you see when it malfunctions:

sh: /tmp/DB_SCHEMA_VERSION: Permission denied
Current Schema Version:-1

Here are the occurrences in the code:

$ grep -n 'tmp/DB' schemamgr/bin/schemamgr_rc.pl 
143:    my $infile = "/tmp/DB_SCHEMA_VERSION";
171:    my $tmpfile = "/tmp/DB_UPGRADE_SCRIPTS";
208:    my $tmpfile = "/tmp/DB_UPGRADE_SCRIPTS";
263:    my $tmpfile = "/tmp/DB_UPGRADE_PROCEDURES";
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

1 participant