all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22650: guixSD default umask is 0000
@ 2016-02-13 14:36 myglc2
  2016-02-21 23:17 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: myglc2 @ 2016-02-13 14:36 UTC (permalink / raw)
  To: 22650

out of the box, umask should default to something more typical.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-02-13 14:36 bug#22650: guixSD default umask is 0000 myglc2
@ 2016-02-21 23:17 ` Ludovic Courtès
  2016-02-22 16:24   ` myglc2
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2016-02-21 23:17 UTC (permalink / raw)
  To: myglc2; +Cc: 22650

I can’t reproduce this.  For instance, in the system created with:

  guix system vm gnu/system/examples/bare-bones.tmpl

‘umask’ returns 0022.

Could it be that your user accounts have shell startup files like
~/.bashrc that specify a different umask?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-02-21 23:17 ` Ludovic Courtès
@ 2016-02-22 16:24   ` myglc2
  2016-02-24 15:41     ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: myglc2 @ 2016-02-22 16:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 22650

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> I can’t reproduce this.  For instance, in the system created with:
>
>   guix system vm gnu/system/examples/bare-bones.tmpl
>
> ‘umask’ returns 0022.
>
> Could it be that your user accounts have shell startup files like
> ~/.bashrc that specify a different umask?

I don't think so. I have attached a log of dot files for a sample user
(glc4) and the most current (feb 12) system config.

'system-generations-package-list' file was generated by 'emacs' 'M-x
guix-system-generations' '"select" (current) generation'

HTH, George

[-- Attachment #2: umask.bug.log --]
[-- Type: application/octet-stream, Size: 7790 bytes --]

glc@g1 ~$ ssh glc4@g1
glc4@g1's password: 
glc4@g1 ~$ umask
0000
glc4@g1 ~$ ls -a
./   .bash_history  .bashrc  .emacs.d/  .guile-wm   .Xdefaults
../  .bash_profile  .cache/  .gdbinit   umask.bug/  .zlogin
glc4@g1 ~$ cat .bash_profile 
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
glc4@g1 ~$ cat .bashrc
# Bash initialization for interactive non-login shells and
# for remote shells (info "(bash) Bash Startup Files").

# Export 'SHELL' to child processes.  Programs such as 'screen'
# honor it and otherwise use /bin/sh.
export SHELL

if [ -n "$SSH_CLIENT" -a -z "`type -P cat`" ]
then
    # We are being invoked from a non-interactive SSH session
    # (as in "ssh host command") but 'cat' cannot be found
    # in $PATH.  Source /etc/profile so we get $PATH and other
    # essential variables.
    source /etc/profile
fi

# Adjust the prompt depending on whether we're in 'guix environment'.
if [ -n "$GUIX_ENVIRONMENT" ]
then
    export PS1='\u@\h \w [env]\$ '
else
    export PS1='\u@\h \w\$ '
fi
alias ls='ls -p --color'
alias ll='ls -l'
glc4@g1 ~$ ls .emacs.d
auto-save-list/
glc4@g1 ~$ cat .zlogin
# Honor system-wide environment variables
source /etc/profile
glc4@g1 ~$ guix package --list-installed
glc4@g1 ~$ cd umask.bug
glc4@g1 ~/umask.bug$ ls
system-generations-package-list
glc4@g1 ~/umask.bug$ cat system-generations-package-list
  bash                 4.3.42     out       Yes          The GNU Bourne-Again SHell
  bash-completion      2.1        out       Yes          Bash completions for common commands
  bzip2                1.0.6      out       Yes          High-quality data compression program
  coreutils            8.24       out       Yes          Core GNU utilities (file, text, shell)
  curl                 7.47.0     out       Yes          –
  diffutils            3.3        out       Yes          Comparing and merging files
  e2fsprogs            1.42.13    out       Yes          Creating and checking ext2/ext3/ext4 file systems
  emacs                24.5       out       Yes          The extensible, customizable, self-documenting text editor
  eudev-with-blkid     3.1.5      out       Yes          –
  findutils            4.6.0      out       Yes          Operating on files matching given criteria
  gawk                 4.1.3      out       Yes          Text scanning and processing language
  git                  2.6.3      out       Yes          Distributed version control system
  git-manpages         2.6.3      out       Yes          Man pages of the Git version control system
  glibc-utf8-locales   2.22       out       Yes          Small sample of UTF-8 locales
  grep                 2.22       out       Yes          Print lines matching a pattern
  guile                2.0.11     out       Yes          Scheme implementation intended especially for extensions
  guix                 0.9.0.c... out       Yes          –
  gzip                 1.6        out       Yes          General file (de)compression (using lzw)
  inetutils            1.9.4      out       Yes          Basic networking utilities
  isc-dhcp             4.3.3-P1   out       Yes          Dynamic Host Configuration Protocol (DHCP) tools
  iw                   3.17       out       Yes          Tool for configuring wireless devices
  kbd                  2.0.2      out       Yes          Linux keyboard utilities and keyboard maps
  kmod                 17         out       Yes          Kernel module tools
  less                 481        out       Yes          Paginator for terminals
  lsof                 4.88       out       Yes          Display information about open files
  lzip                 1.16       out       Yes          Lossless data compressor based on the LZMA algorithm
  magit                2.5.0      out       Yes          –
  man-db               2.7.1      out       Yes          Standard Unix documentation system
  nano                 2.5.1      out       Yes          Small, user-friendly console text editor
  net-tools            1.60       out       Yes          Tools for controlling the network subsystem in Linux
  nss-certs            3.21       out       Yes          CA certificates from Mozilla
  openssh              7.1p2      out       Yes          Client and server for the secure shell (ssh) protocol
  parted               3.2        out       Yes          Disk partition editor
  patch                2.7.5      out       Yes          Apply differences to originals, with optional backups
  pciutils             3.3.1      out       Yes          Programs for inspecting and manipulating PCI devices
  procps               3.3.11     out       Yes          Utilities that give information about processes
  psmisc               22.20      out       Yes          Small utilities that use the proc filesystem
  rsync                3.1.2      out       Yes          Remote (and local) file copying tool
  screen               4.3.1      out       Yes          Full-screen window manager providing multiple terminals
  sed                  4.2.2      out       Yes          Stream editor
  shepherd             0.3        out       Yes          System service manager
  sudo                 1.8.15     out       Yes          Run commands as root
  tar                  1.28       out       Yes          Managing tar archives
  texinfo              6.0        out       Yes          The GNU documentation format
  tmux                 2.1        out       Yes          Terminal multiplexer
  usbutils             006        out       Yes          Tools for working with USB devices, such as lsusb
  util-linux           2.27       out       Yes          Collection of utilities for the Linux kernel
  wget                 1.17.1     out       Yes          Non-interactive command-line utility for downloading files
  which                2.21       out       Yes          Find full path of shell commands
  wireless-tools       30.pre9    out       Yes          Tools for manipulating Linux Wireless Extensions
  xauth                1.0.9      out       Yes          X authority file utility
  xz                   5.2.2      out       Yes          General-purpose data compression
  zile                 2.4.11     out       Yes          Lightweight Emacs clone
glc4@g1 ~$ env
MANPATH=/run/current-system/profile/share/man:/home/glc4/.guix-profile/share/man:/run/current-system/profile/share/man
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
TERM=dumb
SHELL=/gnu/store/shh8qpwvs1h4c60307vpzlcgsgnwcbs8-bash-4.3.42/bin/bash
SSH_CLIENT=127.0.0.1 45632 22
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt
SSH_TTY=/dev/pts/8
USER=glc4
GUILE_LOAD_PATH=/run/current-system/profile/share/guile/site/2.0
GUILE_LOAD_COMPILED_PATH=/run/current-system/profile/lib/guile/2.0/ccache:/run/current-system/profile/share/guile/site/2.0
DBUS_FATAL_WARNINGS=0
XDG_CONFIG_DIRS=/home/glc4/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg
PATH=/home/glc4/.guix-profile/bin:/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin
PWD=/home/glc4
TZDIR=/gnu/store/7vk3r2q6dxb5fq7wm45liwx2vy80wj3v-tzdata-2015g/share/zoneinfo
LANG=en_US.utf8
TZ=America/New_York
PS1=\u@\h \w\$ 
LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules
SSL_CERT_DIR=/etc/ssl/certs
EMACSLOADPATH=/etc/emacs:
SHLVL=1
HOME=/home/glc4
LOGNAME=glc4
XDG_DATA_DIRS=/home/glc4/.guix-profile/share:/run/current-system/profile/share
GST_PLUGIN_PATH=/home/glc4/.guix-profile/lib/gstreamer-1.0
INFOPATH=/run/current-system/profile/share/info:/home/glc4/.guix-profile/share/info:/run/current-system/profile/share/info
_=/run/current-system/profile/bin/env
glc4@g1 ~/umask.bug$ logout
Connection to g1 closed.
glc@g1 ~$ exit
exit

Process shell exited abnormally with code 255

[-- Attachment #3: config.n.scm --]
[-- Type: application/octet-stream, Size: 2125 bytes --]

;; see if tmux supports 256 colors
;; add curl for lpaste
;; add xauth for X11
;; switch to (use-package-modules ...)
(use-modules (gnu))
(use-service-modules networking ssh)
;; tidy up
(use-package-modules admin
		     disk ;; parted
		     ssh rsync wget screen
		     ssh tmux
		     version-control ;; git git-manpages
		     emacs ;; emacs magit
		     curl ;; lpaste
		     xorg ;; xauth
		     certs ;; for HTTPS TLS for git, wget, w3m
		     ) 


(operating-system
  (host-name "g1")
  (timezone "America/New_York")
  (locale "en_US.utf8")
  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
                        (device "g1sd")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  (users (cons* (user-account
                (name "glc")
                (comment "g l c")
                (group "users")
                (supplementary-groups '("wheel"))
		(home-directory "/home/glc"))

  	  (user-account
                (name "glc2")
                (comment "glc2")
                (group "users")
                (supplementary-groups '("wheel"))
                (home-directory "/home/glc2"))

	  (user-account
                (name "glc3")
                (comment "glc3")
                (group "users")
                (supplementary-groups '("wheel"))
                (home-directory "/home/glc3"))
	  
  	  (user-account
                (name "glc4")
                (comment "glc4")
                (group "users")
                (supplementary-groups '("wheel"))
                (home-directory "/home/glc4"))

	  %base-user-accounts))

  (packages (cons*
	     glibc-utf8-locales
	     parted
	     openssh
	     rsync
	     wget
	     screen tmux
	     emacs
	     git git-manpages magit
	     curl ;; lpaste
	     xauth ;; X11
	     nss-certs ;; for HTTPS TLS for git, wget, w3m)
	     %base-packages
	     )
	    )

  (services (cons* (dhcp-client-service)
                   (lsh-service #:port-number 22)
                   %base-services)))

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-02-22 16:24   ` myglc2
@ 2016-02-24 15:41     ` Ludovic Courtès
  2016-03-01  2:25       ` myglc2
  2016-03-07 12:18       ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Ludovic Courtès @ 2016-02-24 15:41 UTC (permalink / raw)
  To: myglc2; +Cc: 22650

myglc2 <myglc2@gmail.com> skribis:

> glc@g1 ~$ ssh glc4@g1
> glc4@g1's password: 
> glc4@g1 ~$ umask
> 0000

Oh indeed, I can reproduce it.

The problem is that lshd resets the umask when it starts (in
src/daemon.c:daemon_init) but never changes it again.

Perhaps we should be using pam_umask and login.defs (although I’m unsure
if lshd would honor it), or alternately add explicitly set the umask in
/etc/profile.

Thoughts?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-02-24 15:41     ` Ludovic Courtès
@ 2016-03-01  2:25       ` myglc2
  2016-03-07 12:18       ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: myglc2 @ 2016-03-01  2:25 UTC (permalink / raw)
  To: 22650

ludo@gnu.org (Ludovic Courtès) writes:

> myglc2 <myglc2@gmail.com> skribis:
>
>> glc@g1 ~$ ssh glc4@g1
>> glc4@g1's password: 
>> glc4@g1 ~$ umask
>> 0000
>
> Oh indeed, I can reproduce it.
>
> The problem is that lshd resets the umask when it starts (in
> src/daemon.c:daemon_init) but never changes it again.
>
> Perhaps we should be using pam_umask and login.defs (although I’m unsure
> if lshd would honor it), or alternately add explicitly set the umask in
> /etc/profile.
>
> Thoughts?

Thanks for looking into this. Sorry, but I'm not qualified to comment. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-02-24 15:41     ` Ludovic Courtès
  2016-03-01  2:25       ` myglc2
@ 2016-03-07 12:18       ` Ludovic Courtès
  2016-03-07 15:18         ` 宋文武
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2016-03-07 12:18 UTC (permalink / raw)
  To: 宋文武, Alex Kost; +Cc: 22650

ludo@gnu.org (Ludovic Courtès) skribis:

> myglc2 <myglc2@gmail.com> skribis:
>
>> glc@g1 ~$ ssh glc4@g1
>> glc4@g1's password: 
>> glc4@g1 ~$ umask
>> 0000
>
> Oh indeed, I can reproduce it.
>
> The problem is that lshd resets the umask when it starts (in
> src/daemon.c:daemon_init) but never changes it again.
>
> Perhaps we should be using pam_umask and login.defs (although I’m unsure
> if lshd would honor it), or alternately add explicitly set the umask in
> /etc/profile.
>
> Thoughts?

宋文武 & Alex: WDYT?  (Asking you since I know you’re already familiar
with these things.  :-))

Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-03-07 12:18       ` Ludovic Courtès
@ 2016-03-07 15:18         ` 宋文武
  2016-03-07 22:25           ` Alex Kost
  0 siblings, 1 reply; 9+ messages in thread
From: 宋文武 @ 2016-03-07 15:18 UTC (permalink / raw)
  To: ludo, iyzsong, Alex Kost; +Cc: 22650

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

于 2016年3月7日 GMT+08:00下午8:18:44, ludo@gnu.org 写到:
>ludo@gnu.org (Ludovic Courtès) skribis:
>
>> myglc2 <myglc2@gmail.com> skribis:
>>
>>> glc@g1 ~$ ssh glc4@g1
>>> glc4@g1's password: 
>>> glc4@g1 ~$ umask
>>> 0000
>>
>> Oh indeed, I can reproduce it.
>>
>> The problem is that lshd resets the umask when it starts (in
>> src/daemon.c:daemon_init) but never changes it again.
>>
>> Perhaps we should be using pam_umask and login.defs (although I’m
>unsure
>> if lshd would honor it), or alternately add explicitly set the umask
>in
>> /etc/profile.
>>
>> Thoughts?
>
>宋文武 & Alex: WDYT?  (Asking you since I know you’re already familiar
>with these things.  :-))
>
>Ludo’.

I never pay attention to umask, but set it in /etc/profile seem the right thing to me. IIRC, debian and exherbo set it in there too.

[-- Attachment #2: Type: text/html, Size: 1433 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-03-07 15:18         ` 宋文武
@ 2016-03-07 22:25           ` Alex Kost
  2016-03-08 22:33             ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Kost @ 2016-03-07 22:25 UTC (permalink / raw)
  To: 宋文武; +Cc: iyzsong, 22650

宋文武 (2016-03-07 18:18 +0300) wrote:

> 于 2016年3月7日 GMT+08:00下午8:18:44, ludo@gnu.org 写到:
>
>     ludo@gnu.org (Ludovic Courtès) skribis:
>
>          myglc2 <myglc2@gmail.com> skribis:
>
>              glc@g1 ~$ ssh glc4@g1
>              glc4@g1's password:
>              glc4@g1 ~$ umask
>              0000
>
>          Oh indeed, I can reproduce it.
>
>          The problem is that lshd resets the umask when it starts (in
>          src/daemon.c:daemon_init) but never changes it again.
>
>          Perhaps we should be using pam_umask and login.defs (although I’m unsure
>          if lshd would honor it), or alternately add explicitly set the umask in
>          /etc/profile.
>
>          Thoughts?
>
>     宋文武 & Alex: WDYT?  (Asking you since I know you’re already familiar
>     with these things.  :-))
>
>     Ludo’.
>
>
> I never pay attention to umask, but set it in /etc/profile seem the
> right thing to me. IIRC, debian and exherbo set it in there too.

I agree ("ArchLinux" also has "umask 022" in /etc/profile).

--
Alex

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#22650: guixSD default umask is 0000
  2016-03-07 22:25           ` Alex Kost
@ 2016-03-08 22:33             ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2016-03-08 22:33 UTC (permalink / raw)
  To: Alex Kost; +Cc: 宋文武, iyzsong, 22650-done

Alex Kost <alezost@gmail.com> skribis:

> 宋文武 (2016-03-07 18:18 +0300) wrote:
>
>> 于 2016年3月7日 GMT+08:00下午8:18:44, ludo@gnu.org 写到:
>>
>>     ludo@gnu.org (Ludovic Courtès) skribis:
>>
>>          myglc2 <myglc2@gmail.com> skribis:
>>
>>              glc@g1 ~$ ssh glc4@g1
>>              glc4@g1's password:
>>              glc4@g1 ~$ umask
>>              0000
>>
>>          Oh indeed, I can reproduce it.
>>
>>          The problem is that lshd resets the umask when it starts (in
>>          src/daemon.c:daemon_init) but never changes it again.
>>
>>          Perhaps we should be using pam_umask and login.defs (although I’m unsure
>>          if lshd would honor it), or alternately add explicitly set the umask in
>>          /etc/profile.
>>
>>          Thoughts?
>>
>>     宋文武 & Alex: WDYT?  (Asking you since I know you’re already familiar
>>     with these things.  :-))
>>
>>     Ludo’.
>>
>>
>> I never pay attention to umask, but set it in /etc/profile seem the
>> right thing to me. IIRC, debian and exherbo set it in there too.
>
> I agree ("ArchLinux" also has "umask 022" in /etc/profile).

Done in 112024826d3283284654475a50ccef81c697e2c9.

Thanks for your feedback,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-03-08 22:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-13 14:36 bug#22650: guixSD default umask is 0000 myglc2
2016-02-21 23:17 ` Ludovic Courtès
2016-02-22 16:24   ` myglc2
2016-02-24 15:41     ` Ludovic Courtès
2016-03-01  2:25       ` myglc2
2016-03-07 12:18       ` Ludovic Courtès
2016-03-07 15:18         ` 宋文武
2016-03-07 22:25           ` Alex Kost
2016-03-08 22:33             ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.