LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-21-2014, 08:45 PM   #16
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled

Quote:
No, this is the user's computer. A desktop computer. I don't know where the topic of Windows entered the discussion.
When you said "users" I automatically assumed Windows. The only Linux users I routinely deal with are other administrators.
Quote:
I haven't figured out how to provide the user with non-root access to restore files,
chmod 1740 /chown back_up_admin:individuals_group
 
Old 05-21-2014, 09:13 PM   #17
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
chmod 1740 /chown back_up_admin:individuals_group
I tried that.
 
Old 05-21-2014, 09:21 PM   #18
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
What was the result?
 
Old 05-21-2014, 09:48 PM   #19
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Users still had full r-w permissions to their respective $HOME.
 
Old 05-21-2014, 11:45 PM   #20
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Users still had full r-w permissions to their respective $HOME.
Their $HOME directory in their archive partition?
Did the file permissions change at all?
And your setting the chmod recursively? chmod -R 1740 ?
I'm sorry, Woodsman as I look back at my suggestion I didn't think to mention that that changing the directory to "read only" but leaving the files "rw" means the group user can't delete the directory however they can modify the files. I'm sorry to have created this confusion...

Try it with the -R switch and see if that doesn't fix it.

Last edited by dijetlo; 05-21-2014 at 11:47 PM.
 
Old 05-22-2014, 12:06 AM   #21
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Woodsman, I think you probably already know this but I'll post it just in case somebody finds it informative.

chmod takes a four digit code. The first digit sets the file mode, "sticky" or " owner delete only" is a 1. If your not setting the sticky bit, you don't need to worry about the first digit, the machine automatically populates it with a 0.
The next three correspond to "owner" "group" and "other" respectively. The number is arrived at as follows.
4 allows read
2 Allows write
1 Allows execute.
But the machine adds the numbers together to arrive at the file permission.
So the corresponding code for owner=rwx , group=rw and other=r is 764 or chmod 764 <file or directory name.>
7 = (Read=4) + (Write=2) + (Execute= 1)
6 = (Read=4) + (Write=2)
4 = (Read=4)
Two switches you need to look at in "man chmod".
Recursive or -R, use this carefully because recursive means...recursive, it'll go until it runs out of files and directories on the system branch it's running on. Anything further down the branch that relies on specific file permissions is going to get smoked.
The second is -c, if you use this switch, it outputs the actual permission changes. A good rule of thumb when working on a production server is to output all your permission changes into a file (mines called "permlog") so I always use the -c switch and then immediately "cat" permlog to make sure I didn't screw it up.

Last edited by dijetlo; 05-22-2014 at 08:11 AM. Reason: Redirection is not piping
 
1 members found this post helpful.
Old 05-22-2014, 07:09 AM   #22
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
So "chmod 1740" is the same as "chmod a+t,o=rwx,g=r,o="

The info page mentioned by the man page goes into pretty good detail.
 
Old 05-22-2014, 07:55 AM   #23
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Exactly Richard, but you see how much easier (once you know the trick) and "cleaner" the numeric is type or read, especially if you're going to script it, which is why I always use the numeric, I've just found it to be a good habit to develop and maintain.
Quote:
The info page mentioned by the man page goes into pretty good detail.
I'm a huge fan of the man and info pages. I go back to them over and over, when Woodsman said chmod 1760 didn't work, I freaked out a little and blasted "man chmod" into the terminal, just to make sure the ol' Alzheimers wasn't kicking in (shoulda been 1740 but at the time I didn't understand his goal here very well).

Last edited by dijetlo; 05-22-2014 at 08:04 AM.
 
Old 05-22-2014, 08:03 AM   #24
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Different strokes for different folks, but I personally find the symbolic version easier to remember and to read than the numeric one. (Especially since the symbolic version matches "ls -l" output.)

Of course, when you use the numbers, you'll never fat-finger an "=" for a "+".
 
Old 05-22-2014, 11:38 AM   #25
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
when Woodsman said chmod 1760 didn't work
I did not write that the command did not work. I wrote that I tried the command and the result was each $USER still had full r-w access to the backup $HOME/$USER files.

The link shared by NeoMetal in post #14 sheds light on the problem. That the rsnapshot developers address the problem of accessing the backup files indicates the problem I am trying to resolve is not as easy as one would think.

Thank you for sharing the information about chmod. I am not a sysadmin and don't need to memorize the fourth bit for daily usage, but I have known about the fourth bit for many years and occasionally use them in administering my own systems.
 
Old 05-22-2014, 12:27 PM   #26
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
I wont bother you anymore about it, Woodsman.
Good luck with that local backup problem.
 
Old 05-22-2014, 03:19 PM   #27
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Thank you for trying to help.
 
Old 05-27-2014, 09:03 AM   #28
NeoMetal
Member
 
Registered: Aug 2004
Location: MD
Distribution: Slackware
Posts: 114

Rep: Reputation: 24
Quote:
Originally Posted by Woodsman View Post
Interesting solution and makes sense --- when the backups are stored on a network. These backups are stored locally and the users don't have networks.

I don't know about the bind mount idea. Something to think about.

I did test chmod 700 to the backup directory. That prevents all access as non-root and alows rsnapshot to run. I haven't figured out how to provide the user with non-root access to restore files, which is the whole purpose of the backups. The user could elevate to root, but these are not savvy users and even they admit they don't want to do things like that. These folks don't do terminals either.

Thus far the wrapper script seems least intrusive as that way users always have read access to the backup files. I am not perturbed by that option --- just seems with all the usual power in a 'nix system there should be a more elegant solution. There probably is but is beyond me.

I think the idea with the NFS share is to export it locally - share back on 127.0.0.1 not requiring it to actually pull over the network, would just need nfsd running
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow non-root users to mount cifs shares Seb Spiers Linux - Newbie 6 05-16-2013 11:40 AM
I changed my users mount to root, and now i can't enter or change it! nate2800 Linux - Newbie 3 10-14-2007 09:16 PM
Allowing other users than root to mount drives DarkPhoenix Linux - Newbie 6 06-25-2004 06:28 AM
letting non-root users mount devices davey Linux - General 3 12-10-2003 06:09 AM
no way for non root users to mount floppy aromes Linux - General 6 09-14-2003 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration