Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #225169
| From | The Wanderer <wanderer@fastmail.fm> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | slashes in filenames [was Re: Error while trying to install openssh-server on Buster] |
| Date | 2020-07-24 01:20 +0200 |
| Message-ID | <AvSFk-82V-7@gated-at.bofh.it> (permalink) |
| References | <AvcmJ-7vA-1@gated-at.bofh.it> <Avlgm-4px-23@gated-at.bofh.it> <AvoQW-6DX-5@gated-at.bofh.it> <AvGEa-K9-35@gated-at.bofh.it> |
| Organization | This space intentionally left blank. |
[Multipart message — attachments visible in raw view] - view raw
On 2020-07-23 at 06:26, Andrei POPESCU wrote: > On Mi, 22 iul 20, 16:26:24, Jonathan Dowland wrote: > >> On Wed, Jul 22, 2020 at 07:38:54AM -0400, Greg Wooledge wrote: >> >>> Apparently this unit refers to the root file system. I have no >>> idea why it's masked for you, but that's where I'd start >>> looking. >> >> Yes. Unfortunately Systemd decided to forbid '/' in unit names, > > Seriously? Could you please show me how would I create a file on *nix > containing '/' in the name? It's theoretically possible, but AFAIK basically nothing would support it or work properly with it. The only ways I can think of to do it that I wouldn't expect to be prohibited by the intermediary layers involved (such as the C standard library) would be A: direct file I/O not involving a library (which I'd guess would probably need to be written in architecture-specific ASM), and B: opening the device underlying the filesystem in a hex editor or similar and modifying the stored data in the inode. The latter is relatively straightforward to do with a tiny filesystem which is backed not by a physical device but by a file created for the purpose, and in fact I've just done it: $ dd if=/dev/zero of=/tmp/testfs bs=1K count=100 $ /sbin/mke2fs /tmp/testfs [as root:] mount -o loop /tmp/testfs /mnt/loop/ [as root:] touch /mnt/loop/filename-without-slashes [as root:] umount /mnt/loop/ $ vbindiff /tmp/testfs f t slash [left arrow] e [right arrow] f [Enter] [Esc] y q [as root:] mount -o loop /tmp/testfs /mnt/loop/ $ ls /mnt/loop/ (Commands paraphrased slightly, but the effect should be identical, barring typos on my part. I've made no effort to identify any checksums, hashes, or other validity data that may exist, never mind update them.) The result, unsurprisingly enough, is: ls: reading directory '/mnt/loop/': Input/output error because neither ls nor basically anything in the stack it sits on supports this, at least not with an ext2 filesystem. In principle it would be possible to design the underlying parts of the system to apply escaping to slashes in filenames, and require escaping to be applied in order to reference files with such. But apparently this has never been done, and I have a vague impression that it might be prohibited by some relevant spec (and, probably, RFC) or another. All of that said: the only reason I can see for any of this to be relevant to systemd's prohibiting / in unit names is if systemd is designed so that there must be a file whose name matches that of the unit, without variations. There are reasons to make that design decision, but it's not an inherent requirement, so this can from a certain perspective be seen as the result of a design decision on the part of the systemd project. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Error while trying to install openssh-server on Buster rhkramer <rhkramer.s32@gmail.com> - 2020-07-22 04:10 +0200
Re: Error while trying to install openssh-server on Buster Andrew Cater <amacater@gmail.com> - 2020-07-22 13:10 +0200
Resolved (without understanding ;-) (was: Re: Error while trying to install openssh-server on Buster) rhkramer <rhkramer.s32@gmail.com> - 2020-07-22 20:40 +0200
Re: Resolved (without understanding ;-) (was: Re: Error while trying to install openssh-server on Buster) Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-22 21:00 +0200
Re: Resolved (without understanding ;-) (was: Re: Error while trying to install openssh-server on Buster) rhkramer@gmail.com - 2020-07-22 22:30 +0200
Re: Resolved (without understanding ; -) (was: Re: Error while trying to install openssh-server on Buster) David Wright <deblis@lionunicorn.co.uk> - 2020-07-22 21:30 +0200
Re: Resolved (without understanding ; -) (was: Re: Error while trying to install openssh-server on Buster) <tomas@tuxteam.de> - 2020-07-23 10:20 +0200
Re: Resolved (without understanding ; -) (was: Re: Error while trying to install openssh-server on Buster) David Wright <deblis@lionunicorn.co.uk> - 2020-07-24 01:50 +0200
Re: Resolved (without understanding ; -) (was: Re: Error while trying to install openssh-server on Buster) <tomas@tuxteam.de> - 2020-07-24 11:00 +0200
Re: Resolved (without understanding ; -) (was: Re: Error while trying to install openssh-server on Buster) Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-24 11:10 +0200
Antipatterns and Handcuffs [was: Re: Resolved (without understanding ...] <tomas@tuxteam.de> - 2020-07-24 11:30 +0200
Re: Error while trying to install openssh-server on Buster Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-22 13:40 +0200
Re: Error while trying to install openssh-server on Buster Jonathan Dowland <jon+debian-user@dow.land> - 2020-07-22 17:30 +0200
Re: Error while trying to install openssh-server on Buster Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-23 12:30 +0200
slashes in filenames [was Re: Error while trying to install openssh-server on Buster] The Wanderer <wanderer@fastmail.fm> - 2020-07-24 01:20 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] Stefan Monnier <monnier@iro.umontreal.ca> - 2020-07-24 01:30 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-24 13:50 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-24 14:00 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] <tomas@tuxteam.de> - 2020-07-24 15:30 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] The Wanderer <wanderer@fastmail.fm> - 2020-07-24 15:50 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] The Wanderer <wanderer@fastmail.fm> - 2020-07-24 16:00 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] <tomas@tuxteam.de> - 2020-07-24 16:10 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] <tomas@tuxteam.de> - 2020-07-24 16:00 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] Michael Stone <mstone@debian.org> - 2020-07-24 16:00 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-24 16:00 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] <tomas@tuxteam.de> - 2020-07-24 16:10 +0200
Re: slashes in filenames [was Re: Error while trying to install openssh-server on Buster] The Wanderer <wanderer@fastmail.fm> - 2020-07-24 14:00 +0200
Re: Error while trying to install openssh-server on Buster Jonathan Dowland <jon+debian-user@dow.land> - 2020-07-24 16:10 +0200
Re: Error while trying to install openssh-server on Buster Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-24 16:20 +0200
Re: Error while trying to install openssh-server on Buster <tomas@tuxteam.de> - 2020-07-24 18:00 +0200
Re: Error while trying to install openssh-server on Buster Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-24 20:50 +0200
Re: Error while trying to install openssh-server on Buster Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-24 21:20 +0200
Re: Error while trying to install openssh-server on Buster <tomas@tuxteam.de> - 2020-07-25 11:40 +0200
Re: Error while trying to install openssh-server on Buster Anssi Saari <as@sci.fi> - 2020-07-22 20:50 +0200
csiph-web