Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm an Ubuntu user and I'd like to change default permissions for downloaded files. Currentely all downloaded files are automatically saved with "-rw-r--r--" permissions (umask 0022). I'd like to add "+x". How to do that?

Regards

share|improve this question
7  
This is a very bad idea. Why do you want to do this? –  Chris Down Sep 24 '11 at 13:56

1 Answer 1

up vote 3 down vote accepted

You would have to edit the source code of the programs performing the downloading as files are created by default as 0666 modified by the current umask. From the fopen(3) man page:

   Any created files will have mode S_IRUSR | S_IWUSR | S_IRGRP |  S_IWGRP
   |  S_IROTH  |  S_IWOTH (0666), as modified by the process’s umask value
   (see umask(2)).
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.