unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pascal Bourguignon <pjb@informatimago.com>
Subject: Re: file permissions
Date: Sun, 30 Apr 2006 05:58:56 +0200	[thread overview]
Message-ID: <87fyjv67en.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: mailman.1140.1146358243.9609.help-gnu-emacs@gnu.org

evaristegalois <evaristegalois@hotmail.com> writes:

> This is probably a simple problem but I can't find anything on it in the
> manual. 
>
> I have emacs version 21 on my ubuntu (linux) computer. Everytime I save a
> file in emacs it is saved with file permissions that allow me to read, write
> and execute the file, but nobody else. Then I upload the file on the net to
> use it on a different computer and can't access it because I am forbidden
> access because I am no longer ``myself'' on a different computer. Right now
> I change the file permissions by hand using the chmod command. 
>
> But for convenience I would like Emacs to save my files right away as files
> that can be read, written to or executed by anybody. How can I accomplish
> this?

Either you can set your global umask (in ~/.profile or ~/.bashrc),
or you can set only emacs' umask with:

(let ((r 4)(w 2)(x 1)(u 64)(g 8)(o 1))
  (set-default-file-modes  (+ (* u (+ r w x)) (* (+ g o) (+ r x)))))

in your ~/.emacs


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Wanna go outside.
Oh, no! Help! I got outside!
Let me back inside!

       reply	other threads:[~2006-04-30  3:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1140.1146358243.9609.help-gnu-emacs@gnu.org>
2006-04-30  3:58 ` Pascal Bourguignon [this message]
2006-05-01 12:50 ` file permissions Tim X
2006-04-30  0:28 evaristegalois

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fyjv67en.fsf@thalassa.informatimago.com \
    --to=pjb@informatimago.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).