help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file permissions


From: Pascal Bourguignon
Subject: Re: file permissions
Date: Sun, 30 Apr 2006 05:58:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]