Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is one of my questions for my exam ..

We are not supposed to use mesg y/n for this but we should effectively avoid mesgs along with the problem of not being able to change groups.

share|improve this question
    
Constraints seem a bit contrived. Perhaps chmod g= "$(tty)"? –  jw013 Oct 15 '12 at 17:39
1  
Ummm, its allowed on your exam to have Unix & Linux Stack Exchange answer the question for you? –  derobert Oct 15 '12 at 20:43
    
Yes but my exam is over long back :P –  user25795 Dec 7 '12 at 4:22

1 Answer 1

mesg just changes the permissions on your tty, so mesg y does

chmod 620 `tty`

and mesg n does

chmod 600 `tty`

i.e. enabling and disabling group write access to the tty device.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.