« first day (1426 days earlier)      last day (3527 days later) » 
00:00 - 15:0015:00 - 00:00

12:12 AM
@Braiaim - Well, certainly not ten hours. Put on a song and ask me - 'say, how long you figure this song is?' and I'll usually answer: 'somewhere between 3 and 6 minutes.;
@Braiam - you're a networking guy. You got any opinion on this? I think I might be right about the G thing. If I recall Atheros sticks are not well supported...
2
Q: Fake linux as android device

user2383408How can I let my GNU/linux completely mimic an android device when connecting to a wireless Access Point? I explain: I moved to another location and it seems that my android phone and tablet have a wireless internet connection of more than 20mbps. However, this does not happen with my main compu...

But I've honestly forgot completely how to check. Maybe you could point the guy in the right direction? He seems nice enough - and he certainly flattered me.
 
12:36 AM
@mikeserv actually I'm just "the guy", and yes, I added a comment, I think that his problem can be rather simple (like modifying the rate of the card) but the information shown isn't the ideal
 
12:59 AM
@mikeserv, may be an example for the use case I told :)
0
A: how to change a complete line with sed c option

mikeservI don't know your sed version, but my suspicion is that it doesn't support those word barrier markers: sed '/ Oliva /c\ Sergio Oliva Cuba 1967 1968 1969 ' <<\DATA Larry Scott USA 1965 1966 Sergio Oliva USA 1967 1968 1969 Arnold Schwarzenegger Osterreich 1970 1971 1972 1973 1974 1975 Franco Colum...

 
@Ramesh - maybe so. Are you sure the guy just doesn't know how or can't do it? I don't know. I didn't even notice, honestly.
 
@mikeserv, the user has good reputation but yet he has accepted an answer without uvting.
 
how much do you need to upvote do you think?
 
15 or 25 is enough, I guess
 
oh, then yes, definitely.
weird.
probably just missed it or doesn't know you can do both.
 
1:05 AM
No. He has around 5k in stack exchange.
 
oh. then what is the motivation behind that? i can't see any sense in it.
 
That's why I was telling you earlier that I had noticed it quiet frequently.
 
@Ramesh - that is an odd behavior indeed.
 
People are people..
 
well, now you've confused me. so I have to touch every third corner in the house three times. back in a few.
gee. I have got to get a circular house.
 
1:14 AM
Do you know what /proc/pid/mountinfo does?
I am trying to figure that one out.
 
yeah. It's lists the process's mounts.
Since around 2.8 or so you've been able to mount in namespaces - or per process.
 
Yeah, but I have this file for all the pids.
And the file has same contents for all the pids.
 
It's pretty neat.
 
When will the file have different contents?
 
do unshare --help
when it is mounted elsewhere.
oh - when will that file have different contents than /proc/mountinfo?
When /proc/ is mounted in a pid namespace.
 
1:17 AM
@mikeserv yeah.
 
It's like the first or second question I asked here. @Graeme did an excellent answer:
7
Q: Reliable way to jail child processes using `nsenter:`

mikeservI know that Linux namespaces, among many other things, can be leveraged to handle restricting and jailing child processes securely without any chance of their being zombied and dumped on init. But I'm fuzzy on implementation details. How might I use the tools provided by util-linux such as mount ...

So there are different types of mounts.
bind shared private unbindable and...
one more ...
dammit
slave
 
Man, this is too much information to digest.
:)
 
Oh - it's a deep rabbit hole. It goes all the way down.
just scroll down to the diagrams at that kernel org link.
 
Ok, first let me try to understand your question from the first link you gave.
 
anyway - not only can you propagate mounts in different ways in the tree - you can do this per individual process
 
1:21 AM
I will try and understand namespace first.
 
so one process will see a tree that another does not.
that tree is reflected in /proc/$pid/mountinfo
you can unshare a mount
 
Ok, so I am just beginner to this concept.
I will try to tell what I understood so far.
@mikeserv, it is actually getting pretty nastier.
 
No. no.
Not lxc, not aufs.
aufs, by the way, is a terrible, ugly hack.
overlayfs as well.
they're kernel patches.
always a bad idea.
I'm talking about linux namespaces.
Here, gimme a sec to remember how it's done and I'll just show you.
 
sure.
 
1:43 AM
@Ramesh - Ok.
su - ; unshare -m sh -c 'mount --make-rslave .; mount /dev/sdd1 mnt; ls mnt'; ls mnt
Output:
EFI
sudo is screwy here. su is for that matter, but at least it's a little less so.
It's their pty thing.
Those two are seriously psychotic, by the way.
Anyway, su as above - or maybe sudo -s?
Then you can start delegating out mounts per process.
 
@mikeserv, I do not get any output.
It doesn't give me any error neither.
 
You use the .?
 
I just copied whatever you gave.
 
Oh - do you have a mnt directory?
Wherever you are?
 
Yeah I have a mnt in the / directory.
 
1:48 AM
I'm in /tmp/test and I created a mnt directory within.
Also - do you have a /dev/sdd1?
 
I do not have.
 
Well, the idea is to get a root shell, then start launching processes with private mount trees.
 
I get the idea. I just logged in to the machine as root.
 
unshare works kind of like sudo in that it executes the command you feed it as arguments with a modified environment.
So in my example command I launch an unshared sh -c in which all of its mounts are private only to that process. So when I do in sh -c 'mount /dev/sdd1 mnt; ls mnt'; ls mnt I'm just listing the contents of the same directory twice. But in the sh -c shell it is a mountpoint.
 
@mikeserv, the command you gave, is it supposed to create a per process file system mount point?
 
1:54 AM
yes.
The man page says:
 
@mikeserv, amazing. I just got this to work from here.
 
mount namespace
Mounting and unmounting filesystems will not
affect the rest of the system (CLONE_NEWNS
flag), except for filesystems which are
explicitly marked as shared (with mount
--make-shared; see /proc/self/mountinfo for
the shared flags).

It's recommended to use mount --make-rpri‐
vate or mount --make-rslave after unshare
--mount to make sure that mountpoints in the
new namespace are really unshared from the
parental namespace.
 
exactly - that's the same thing.
And that's what /proc/$pid/mountinfo is for.
But that's not all - there are 4 other namespaces. Or 5?
You'll find their representative files in /proc/$pid/ns/*
 
@mikeserv, How I can find hidden mountpoint, and umount it?
 
2:09 AM
If the process is dead, you don't.
You can keep a process's namespaces around by keeping a handle on /proc/$pid/ns/* file.
A common way is to mount --bind one of those elsewhere.
As long as that handle is maintained you can deal with its environment - even after the process and all of its children die.
 
How to know that pid?
I am not sure I noted the pid of this.
 
Well, gee - you launched the command.
Who cares?
What did you mount? If the process is dead the only handle on that mount is the kernel's own. No security problems there.
 
@mikeserv, I am not sure. I think I am little confused here.
 
you're not sure what you mounted?
 
I launched a new /bin/bash process with that mount command.
 
2:14 AM
ok. what did you mount?
 
Now, I open another terminal and go to /tmp/tmp.*
 
right
 
The files that I created in the first shell are not present.
 
right.
they do still exist... kind of
They're vaporware now.
They're floating in VFS.
But you can't have them.
 
Ok. So each pid is like a own OS now if I have to tell it vaguely.
 
2:17 AM
Well. No. That only works for mounts in the -m mount namespace.
Everything else is public.
But there are other namespaces.
Just do unshare --help.
man unshare.
The --user namespace is pretty much as you say though.
And - if you set it up right in the first place - you can create entire virtual environments in which you are the root user without root permissions.
 
@mikeserv, cool. So, how much memory can this VFS utilize?
 
I dunno. As much as it wants.
Everything is VFS.
The kernel has a virtual file system.
When people say everything is a file that's what it boils down to.
vfs.
 
@mikeserv, thanks.
 
basically all file-system drivers are extensions to vfs.
And that's why FUSE filesystems suck - they're not in kernel. They're not vfs supported. They're user-space pipe-layers, basically. They're dangerous.
 
2:34 AM
@mikeserv, the first step to all this would be,
Unshare the process for which we need to create a new namespace.
Now, where can I see this unshared process entry in /proc?
 
Well, when launching the command with unshare you can simultaneously --bind mount a copy of that process's /proc tree elsewhere.
it's in man unshare.
 
So it is not persistent across reboots I suppose. Am I correct?
 
no mount is.
not even /proc. It's mounted by init.
 
ok. too much info..
:)
 
ok. then, no.
you'd have to script its setup somehow to make it so.
 
2:42 AM
yeah.
 
bur you can always mount any file anywhere.
 
I think that can be accomplished using --bind option, right?
 
like echo hey > file; cat file; sudo mount --bind /dev/null file; cat file
yeah. and that is a way easier to maintain system than anything involving symlinks.
 
@mikeserv, is this understanding correct so far?
- Unshare /bin/bash process.
- --bind the /proc to /tmp/some-folder.
- In the unshared bash, whatever process I run, it will be listed under /tmp/some-folder.

** - The unshared processes and the children I create under the unshared process are not visible from /proc/pid in the original shell.
 
no.
not if we're talking about mount namespaces.
in that case the only private thing about those processes are their mount trees. everything else is as public as ever.
the pid namespace, however...
there are also net namespaces, IPC namespaces, and...
gee, I dunno.
 
2:50 AM
hmm, so unshare actually takes care of creating all the namespaces is it?
ok, I will try to phrase it correctly.
Ah, @mikeserv, I get it now.
completely private mount points for each process.
 
yes. for the mount namespace
 
So it is just like connecting an external HDD but in the sense each process gets its own mount point.
@mikeserv yeah. Let's discuss mount namespace for time being :)
 
yes. that's all
 
And within each mountpoint, the process gets the pid of 1 and the children get respective pids as well.
 
though if you're thinking of the external hdd in terms of gnome-fuse - no.
no
that's pid namespace
gnome-fuse just hides your mounts from other users
 
2:56 AM
okies. I get it. I was confusing mount and pid then all this time.
So private mount option is for pid name space?
 
with mount namespaces they actually only exist for the specified process.
well, when you do the proc thing you do both.
pid + mount
they're not mutually exclusive.
 
So what is the use of this mount namespace?
 
to have a private mount in a process!
you saw one use - the private tmpfiles thing.
no race-conditions there.
but the pid 1 thing only happens in pid namespaces
 
So let us say I create a mount name space as above, will there be an assosciated pid under /proc for this unshared process?
 
from outside the process ` in /proc/` it will be a regular pid. In /tmp/proc it is pid 1. inside the process it is /proc/1
I think.
definitely that way in a pid namespace - which I think is automatically done when you do the proc bind thing. maybe just mount namespace in that case.
it's in man unshare
 
3:06 AM
Ok, So let's say I have to explain to a non technical person - Can I say mount namespace is like creating a new incognito window?
 
um. for file mounts.
 
The browser history in my original browser is similar to /proc.
Whatever nasty am doing in the incognito window is not visible to my browser or /proc.
 
but the difference is the incog doesn't have a history
with namespaces the history is there - but it is branched.
 
Sure. I think I understand it and is this analogy good?
 
And it branches very specifically. mounts branch mounts. pids - pids. users - users. etc.
 
3:09 AM
@mikeserv That can be assumed like firefox incognito, chrome incognito etc.
 
i dunno/
i only use chrome.
 
He he. I also use only chrome. But for example sake.
 
but really, if you have to explain it to a non-technical person, good luck.
 
No, I am trying to understand from a non technical person pov first.
 
well.
you've already done it
i think i might be in over my head...
so /proc/pid/root and cwd and all of that can be different per process.
and when a process changes directory it goes somewhere - somewhere on a mount point.
mounts are vfs. the kernel owns that. That is firmly, deeply, 100% kernelspace.
The kernel lets those processes see those mountpoints.
With mount namespaces, it can let a process see a different mount point than it does another.
 
@Gnouc correct me if I'm wrong, but people can't downvote a comment
 
@Braiam: No, my answer is downvote, I'm thinking why :)
 
@Gnouc the link takes me to a comment
and the answer that that comment is attached to isn't even yours
 
Sorry my mistake, here is the link: unix.stackexchange.com/a/153663/38906
 
3:58 AM
@mikeserv, well I learnt something interesting and new today, thanks to you.
 
you're welcome. and it was a very useful refresher for me as well.
 
cartmanasa time now. See you tomorrow.
Good night.
 
 
4 hours later…
8:15 AM
@Braiam ping. do you happen to easily lay your hands on that question you asked about apt breakage?
Never mind. Found it.
Can we make
15
Q: Let's compile a list of canonical Q&As

terdonA few of us were talking about this the other day in chat, as we are now quite a bit larger and with several thousand Q&As, there are certain questions that are asked very often. Things like redirecting output, process substitution, batch renaming of files, fixing/reinstalling grub, etc. Let's c...

sticky or something? So people people perhaps use/reference it more? Should I post a meta question about this?
@terdon @slm @Gilles ?
@Caleb what do you think?
 
8:47 AM
@FaheemMitha It might be worth adding to that for a while.
 
@Caleb Add a featured tag to the question above?
I.e. " Let's compile a list of canonical Q&As"
 
 
3 hours later…
11:36 AM
@StéphaneChazelas - howdy.
 
 
2 hours later…
1:35 PM
The best place to list canonical QAs is not as a mess on meta, but in the tag wiki for the relevant tag(s). — Gilles 12 secs ago
I think this meta thread is pointless. If I'm looking for a canonical question on a topic I'm not going to wade through that.
 
1:52 PM
@Gilles Interesting notion. @terdon, what do you think?
 
@Gilles agreed
 
@Gilles suppose it matches multiple tags?
09:55 < faheem_> moritz: consider i've cloned a repos, including submodules. call it foo. then if i do -> git clone foo foo-clone, shouldn't foo-clone get everything locally?
9:58 < faheem_> i see, it rewrites the url for the main repo, but not for the submodules. i wonder why
Extracts from #git on freenode. Any git users care to comment?
 
I'm not sure I'm following exactly what you are trying to do @FaheemMitha but if it is just cloning a repo with submodules I generally do the clone, then "git submodule update --recursive" to grab everything locally
perhaps there is an --init in there as well, I don't do it often
 
2:08 PM
@Gilles @FaheemMitha My objective with that meta question was to get community consensus on whether something is a canonical Q&A or not. I was then planning to post a different meta Q with simple, direct links to each Q&A. It's about time I did that actually and if you all agree I will now proceed to do so.
Ideally, we would end up with something like this:
1371
Q: FAQ for Stack Exchange sites

Justin StandardCommunity FAQ For sites in the Stack Exchange 2.0 network To see a list of commonly used words and phrases, see the glossary. For official guidance from Stack Exchange, visit the Help Center. Asking questions How do I write a good title? How can I get answers fast? Where can I ask a ques...

But listing the canonical Q&As for different subjects.
I don't much like the idea of using the tag wikis for this. 1) very few people look there, 2) that splits up the information into the various tag pages which makes it even harder to find.
Would the canonical Q about replacing text be under text manipulation? Sed? Perl? How about say running a job in the background? [Shell]? [shell-script]? [bash]? [terminal]? [zsh]?
I think that a well organized meta thread (which we do not have at the moment) would be best.
 
@FaheemMitha you list it from all relevant wikis
@terdon 1) only people in the know look for canonical questions anyway, primarily to use as duplicate targets
@terdon 2) splitting is the whole point, and makes information a lot easier to find than in a multi-page thread organized in a random order
@terdon if it's about choosing the right tool for the job, . If it's about using a specific tool,
 
@Gilles Not multipage and not random! I am thinking of a Q with no answers, simply a list of subjects that are links to their respective canonical Q&As.
 
@terdon there's no need to have a community consensus. Canonicality isn't yes-or-no.
@terdon If you start organizing, you need a classification system. We already have one: tags.
 
@Gilles Yes, but that was my original thought. I just wanted help compiling them. I should have done it the way I describe above in the first place I know.
 
And we already have a way to go from a tag to associated information: the tag wiki.
@terdon what's the point? I never go looking for a canonical question. I go looking for a canonical question about <topic>.
 
2:18 PM
@Gilles OK, that makes sense. I guess I could try and sort by tags. We can then add the info to the tag wiki and also have the meta for (IMO) easier access.
I think it's great to have some canonical Qs in the relevant tag wiki. I also think it is very useful to have an aggregate of them in meta. I will often have trouble guessing which tag wiki to look at and can simply search through the meta Q.
 
@terdon I've been using tag wikis as repositories for canonical questions for years and it works well. I don't see the point of any meta thread and wouldn't use it.
 
Anyway, I don't see why the 2 are mutually exclusive.
 
They aren't. I'm just saying that as far as I'm concerned, the meta thread is useless. I won't update it and I won't check it.
 
@Gilles Fair enough. I disagree, I think the meta approach is easier to use but as I said, I see no reason why we can't have both.
@Gilles Sounds fair.
 
Hi guys, Why is my question being closed: unix.stackexchange.com/questions/153539/…?
 
2:21 PM
@Kevdog777 Because it is "primarily opinion based"
Different people have different preferences, some use the numerical permissions and some the letters. Both are fine, both work. You are asking which is most common and we have no idea. We'd have to run a survey.
 
@terdon Ok, I was just checking what the most common was, and as I only gave the two options, most people were coming back with more than what was expected (i.e. chmod 0777 ...)
 
@Kevdog777 Yes but as a general rule, "What is the most common X" will always be closed as opinion based.
 
@terdon Ah ok, thanks. A lot of people marked it as useful, so I thought it was a good question.
 
@Kevdog777 Unfortunately, people often vote up because they find something interesting, despite its not being a good fit for the site.
 
@terdon So if I can edit it, so it's not Opinion Based, will that make it a better question?
 
2:28 PM
@Kevdog777 Absolutely. What would make it ask?
 
@terdon How do you mean?
 
@FaheemMitha which?
 
@Kevdog777 I mean what would the question be? At the moment you are asking which of the two methods is most popular. You have accepted an answer that is answering something quite different and explaining the difference between two specific chmod commands.
That is not actually about whether numerical modes are preferred or better than alphabetical ones.
 
@terdon Yeah, I accepted the correct answer first (jwhitlock), then changed it to the answer now - but then thought that the first accepted answer was actually the correct one.
 
@Kevdog777 I would just leave the question. It should be closed since it is opinion based but there are some useful answers. If you edit it to be a different question, those answers become irrelevant. I would just leave it as it is.
 
2:37 PM
@terdon Ok, thanks for your help :)
 
I was just reviewing an edit. It already had a rejection and the other user had selected "custom" as the reason for the rejection.
I was trying to select the same reason but it did not allow me to. I tried entering my own comments in the custom section and then also I couldn't do it.
Am talking about this one..
 
@Ramesh Probably because it had already been rejected by the time you tried to write your comment.
 
@terdon, no. I see there was one approve and one reject before me. It got rejected after I rejected the edit.
 
@Ramesh you cannot select the same custom reason
 
@Braiam, I understand that. But I was not able to give my own custom reason as well.
 
2:48 PM
@Ramesh mm... that is indeed werird
 
@Ramesh Dunno. Sounds like a glitch but I can't reproduce it. Post a meta Q about it if it happens again.
 
@terdon sure. But this case is pretty rare as we often do not get to see those many rejects and that too with custom reason.
 
@Gilles what does this mean? no need to have a community consensus. Canonicality isn't yes-or-no...
What is canonicality?
And if the community does not decide what that is, who does?
 
00:00 - 15:0015:00 - 00:00

« first day (1426 days earlier)      last day (3527 days later) »