in reply to File permissions problem
Hi wdhammond,
The code you've provided isn't runnable, and doesn't show the code that actually writes to the file; it would be better if you could show us a Short, Self-Contained, Correct Example. There isn't anything obvious in the code you posted that would influence the file permissions.
Perhaps you need to check your umask, both by running the umask command from the command line, as well as checking the umask in the script via something like printf "%04o\n", umask;. If either of those show, for example, 0077, that would explain the issue.
Update:
I noticed in another post on your site that "stat" does not return a value unless "File::stat" in included.
No, stat is a builtin that should always be available. File::stat just replaces the builtin stat with a function that returns an object instead of a list of values. But in either case, stat only reads the file information, and does not modify it, so that won't be the cause of the problem.
Hope this helps,
-- Hauke D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File permissions problem (updated)
by wdhammond (Novice) on Dec 15, 2016 at 21:51 UTC | |
by haukex (Archbishop) on Dec 15, 2016 at 22:05 UTC | |
by wdhammond (Novice) on Dec 15, 2016 at 23:21 UTC | |
by wdhammond (Novice) on Dec 15, 2016 at 22:57 UTC | |
by haukex (Archbishop) on Dec 16, 2016 at 09:01 UTC | |
by wdhammond (Novice) on Dec 16, 2016 at 15:45 UTC | |
| |
by choroba (Cardinal) on Dec 15, 2016 at 21:58 UTC | |
by wdhammond (Novice) on Dec 16, 2016 at 15:51 UTC |