Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8829049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:44:45+00:00 2026-06-14T07:44:45+00:00

I have a cron job, which is running under a user called ‘deployer’ with

  • 0

I have a cron job, which is running under a user called ‘deployer’ with limited access. The cron job is performing a backup of my redis database resulting in a dum /var/lib/redis/dump.rdb.

Now the cron job now tries to perform a /bin/gzip -c /var/lib/redis/dump.rdb > /home/deployer/Backup/.tmp/redis_backup/databases/Redis/dump.rdb.gz before shipping it off to S3. The problem is, that the permissions on /var/lib/redis/dump.rdb is -rw-rw—-, so I get the following error:

gzip: /var/lib/redis/dump.rdb: Permission denied

So my question is, I’m not interested in giving my deployer user wider permissions, so I would like that dump, that is being created every time the cron job is run, to have other permissions.

How can I accomplish that the simplest way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:44:46+00:00Added an answer on June 14, 2026 at 7:44 am

    The Redis dump file is created with a standard fopen(‘…’,”w”) call. So the access rights are actually inherited from the current umask.

    Try to alter the umask in the script or the shell used to launch the Redis server, before launching the Redis server itself, by using the umask command:

    $ umask 022
    

    This command will change the mask so that new files will be created with 644 access rights (666 being the default access rights).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have couple of php scripts which are called by cron. The cron job
I have cron job - php script which is called one time in 5
I have a python script running on a cron job, once a minute, which
I have a cron job which needs running on my site. I have set
I have a cron job to run a Ruby script, which runs fine on
I have a servlet running on GAE and I have a cron job that
I have a table with 200 rows. I'm running a cron job every 10
Suppose I have ten cron jobs running in parallel which fetch entries from database
I am running a cron job every five minutes which calls a php script
i have created a cron job which is run every 5 minutes. but when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.