all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thievol@posteo.net>
To: Andreas Schwab <schwab@suse.de>
Cc: 61708@debbugs.gnu.org
Subject: bug#61708: 28.2; file-modes-symbolic-to-number inconsistency
Date: Wed, 22 Feb 2023 14:58:29 +0000	[thread overview]
Message-ID: <87356xybtx.fsf@posteo.net> (raw)
In-Reply-To: <mvm4jrdrd32.fsf@suse.de>

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


Andreas Schwab <schwab@suse.de> writes:

> On Feb 22 2023, Thierry Volpiatto wrote:
>
>> (format "%o" (file-modes-symbolic-to-number "u=rwx,g=r-x,o=---"))
>> "740"
>
> This is the correct interpretation of the mode string, with "g=r-x"
> meaning the same as "g=r,g-x" or just "g=r".

So how do you interpret this: "drwxr-x---" (from file-attributes)?
"u=?,g=?,o=?" to pass it to file-modes-symbolic-to-number?

(nth 8 (file-attributes "/home/user"))
"drwxr-x---"

(read-file-modes nil "/home/user")
#o750

Thanks.

> See
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html
> for the full syntax.


-- 
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]

  reply	other threads:[~2023-02-22 14:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 13:49 bug#61708: 28.2; file-modes-symbolic-to-number inconsistency Thierry Volpiatto
2023-02-22 14:16 ` Thierry Volpiatto
2023-02-22 14:26 ` Andreas Schwab
2023-02-22 14:58   ` Thierry Volpiatto [this message]
2023-02-22 15:45     ` Andreas Schwab
2023-02-22 17:03       ` Thierry Volpiatto
2023-02-22 17:11         ` Gregory Heytings
2023-02-22 17:44           ` Thierry Volpiatto
2023-02-22 21:40             ` Gregory Heytings
2023-02-23  4:44               ` Thierry Volpiatto
2023-02-23  6:08               ` Eli Zaretskii
2023-02-23  7:00                 ` Thierry Volpiatto
2023-02-23  9:18               ` Andreas Schwab
2023-02-23  9:27                 ` Gregory Heytings
2023-02-23  9:14         ` Andreas Schwab

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

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

  git send-email \
    --in-reply-to=87356xybtx.fsf@posteo.net \
    --to=thievol@posteo.net \
    --cc=61708@debbugs.gnu.org \
    --cc=schwab@suse.de \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.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.