logrotate create the renmaed files with root as the owner even though I am using 'su myuser myuser'?How to...
How to kill my goat in Goat Simulator
Why did House of Representatives need to condemn Trumps Tweets?
Writing a clean implementation of rock–paper–scissors game in C++
How much were the LMs maneuvered to their landing points?
Is there a list of words that will enable the second player in two-player Ghost to always win?
If my pay period is split between 2 calendar years, which tax year do I file them in?
Why was Sauron preparing for war instead of trying to find the ring?
Struggling with cyclical dependancies in unit tests
How to store my pliers and wire cutters on my desk?
If Trump gets impeached, how long would Pence be president?
How to get CPU-G to run on 18.04
Catan Victory points
All unitary errors are correctable
Copying an existing HTML page and use it, is that against any copyright law?
Old French song lyrics with the word "baiser."
Examples of simultaneous independent breakthroughs
Sea level static test of an upper stage possible?
Decreasing star count
Melee or Ranged attacks by Monsters, no distinction in modifiers?
Why do planes need a roll motion?
How to judge a Ph.D. applicant that arrives "out of thin air"
Request for a Latin phrase as motto "God is highest/supreme"
Is cardinality continuous?
The Sword in the Stone
logrotate create the renmaed files with root as the owner even though I am using 'su myuser myuser'?
How to properly automatically/manually rotate log files for production Rails AppError stat of log failed: Permission denied during LogRotationlogrotate unable to rotate logslogrotate not compressing files as expectedDelete empty files with logrotateIs logrotate -f not supposed to be used anymore?Why is logrotate not automatically rotated?Why does logrotate generate empty log files when using two wildcards in log path?Logrotate not occurring automaticallyLogrotate “permission denied” error
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am using logrotate to rtate the logs of an application, and here is the logrotate config file:
/home/cowrie/cowrie/log/cowrie.json.????-??-??
/home/cowrie/cowrie/log/cowrie.log.????-??-?? {
size 1K
dateext
dateformat .%Y%m%d-%s
missingok
rotate 1000
compress
notifempty
sharedscripts
su cowrie cowrie
}
when I run logrotate, it renames the files but because the ownership of the renamed files are 'root root' it gives the error:
error: unable to open /home/cowrie/cowrie/log/cowrie.json.2019-07-28.20190729-1564375882 for compression
I was under the impression that by using su cowrie cowrie
every would be run under that user and the file will also have this user as its owner. How can I fix it? I have not used 'create 640 cowrie cowrie'
as I don't want to create new files.
permissions logrotate
add a comment |
I am using logrotate to rtate the logs of an application, and here is the logrotate config file:
/home/cowrie/cowrie/log/cowrie.json.????-??-??
/home/cowrie/cowrie/log/cowrie.log.????-??-?? {
size 1K
dateext
dateformat .%Y%m%d-%s
missingok
rotate 1000
compress
notifempty
sharedscripts
su cowrie cowrie
}
when I run logrotate, it renames the files but because the ownership of the renamed files are 'root root' it gives the error:
error: unable to open /home/cowrie/cowrie/log/cowrie.json.2019-07-28.20190729-1564375882 for compression
I was under the impression that by using su cowrie cowrie
every would be run under that user and the file will also have this user as its owner. How can I fix it? I have not used 'create 640 cowrie cowrie'
as I don't want to create new files.
permissions logrotate
add a comment |
I am using logrotate to rtate the logs of an application, and here is the logrotate config file:
/home/cowrie/cowrie/log/cowrie.json.????-??-??
/home/cowrie/cowrie/log/cowrie.log.????-??-?? {
size 1K
dateext
dateformat .%Y%m%d-%s
missingok
rotate 1000
compress
notifempty
sharedscripts
su cowrie cowrie
}
when I run logrotate, it renames the files but because the ownership of the renamed files are 'root root' it gives the error:
error: unable to open /home/cowrie/cowrie/log/cowrie.json.2019-07-28.20190729-1564375882 for compression
I was under the impression that by using su cowrie cowrie
every would be run under that user and the file will also have this user as its owner. How can I fix it? I have not used 'create 640 cowrie cowrie'
as I don't want to create new files.
permissions logrotate
I am using logrotate to rtate the logs of an application, and here is the logrotate config file:
/home/cowrie/cowrie/log/cowrie.json.????-??-??
/home/cowrie/cowrie/log/cowrie.log.????-??-?? {
size 1K
dateext
dateformat .%Y%m%d-%s
missingok
rotate 1000
compress
notifempty
sharedscripts
su cowrie cowrie
}
when I run logrotate, it renames the files but because the ownership of the renamed files are 'root root' it gives the error:
error: unable to open /home/cowrie/cowrie/log/cowrie.json.2019-07-28.20190729-1564375882 for compression
I was under the impression that by using su cowrie cowrie
every would be run under that user and the file will also have this user as its owner. How can I fix it? I have not used 'create 640 cowrie cowrie'
as I don't want to create new files.
permissions logrotate
permissions logrotate
asked 28 mins ago
AlexAlex
2025 silver badges12 bronze badges
2025 silver badges12 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f532673%2flogrotate-create-the-renmaed-files-with-root-as-the-owner-even-though-i-am-using%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f532673%2flogrotate-create-the-renmaed-files-with-root-as-the-owner-even-though-i-am-using%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown