LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-29-2016, 01:33 PM   #1
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Rep: Reputation: 30
My user needs full access without sudo


Ok, so I need to have full access to view folders on my server without using sudo.

The backintime program that runs my backup to my backup server does not work for me when I run it as root. It just won't connect to the backup server. So, I decided to just run the backintime backup with my regular user.

Problem is that some folders are set to 700 (owner only) and I can't get in without sudo. So those folders don't get backed up.

I made my user a member of all the groups on the server but that does nothing for me.

How do I get my user to have full read access to all folders on the server without sudo

I'm running lubuntu 14.04 on the server.
 
Old 03-01-2016, 01:39 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,149

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
have you tried setfacl:


setfacl -m u:captJ:r /path/to/journey
 
Old 03-01-2016, 01:51 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
why without sudo?
 
Old 03-01-2016, 04:45 AM   #4
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
Quote:
Originally Posted by xmrkite View Post
Problem is that some folders are set to 700 (owner only) and I can't get in without sudo. So those folders don't get backed up.

I made my user a member of all the groups on the server but that does nothing for me.
Then what happened to the group security of the folders? If it remains at 0, then you can't really expect having read access to folders owned by other members of your group.

Cheers.
 
Old 03-01-2016, 12:06 PM   #5
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
When backintime runs as root (sudo), it won't connect to my backintime server at all. When I run it as my user it connects, but I don't have full access to all folders and files on my own server...just read access is all I need.
 
Old 03-01-2016, 12:06 PM   #6
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by JJJCR View Post
have you tried setfacl:


setfacl -m u:captJ:r /path/to/journey

Won't that be undone though as they upload new files and folders? Won't the next rsync see the change and reupload the files?
 
Old 03-01-2016, 08:32 PM   #7
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,149

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Lightbulb

Quote:
Originally Posted by xmrkite View Post
Won't that be undone though as they upload new files and folders? Won't the next rsync see the change and reupload the files?
you can do a simple test and check the result.
 
Old 03-02-2016, 12:47 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
see man page of sudo:
Code:
 -u user, --user=user
                 Run the command as a user other than the default target user (usually root ). The user may be either a user name or a numeric
                 user ID (UID) prefixed with the ‘#’ character (e.g.  #0 for UID 0).  When running commands as a UID, many shells require that
                 the ‘#’ be escaped with a backslash (‘\’).  Some security policies may restrict UIDs to those listed in the password data‐
                 base.  The sudoers policy allows UIDs that are not in the password database as long as the targetpw option is not set.  Other
                 security policies may not support this.
What is the problem with sudo?
 
Old 03-02-2016, 01:13 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
then use "su - " and the root password

Code:
su -
--- your root pass when asked --
gedit
 
  


Reply

Tags
backintime, lubuntu, sudo, ubuntu



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
Giving sudo access to a user by adding to a group lslack Linux - Server 4 11-03-2013 11:48 PM
sudo access for a user to read mail files slufoot80 Linux - Newbie 1 05-06-2013 04:10 PM
sudo access for a user to a script kaplan71 Linux - Security 1 01-18-2011 01:28 PM
visudo? I need to provide sudo access to Oracle User rohit724 Linux - Newbie 2 12-09-2010 10:25 AM
Make A Full Access User Wolf-67 Linux - Newbie 4 10-06-2004 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:04 PM.

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