I have a directory owned by root (/var/log/apache2). I would like a user to have read only access to this folder - without changing the group owner of this folder. Is it possible to do that without adding user to the sudoers file?
How can I give user access to folder owned by root without adding user to sudoers file?
3.1k Views Asked by Varun Verma At
1
There are 1 best solutions below
Related Questions in LINUX
- How do I recursively find and replace only in files named index.php on Linux webserver?
- passing text with \n as one argument in shell
- kernel module does not print packet info
- How to send ESC/POS commands to thermal printer in Linux
- (x64 Nasm) Writeline function on Linux
- How do I set the Hive user to something different than the Spark user from within a Spark program?
- Default priority of thread with SCHED_FIFO
- Calling a python function with options from shell script
- How to split a directory into parts without compressing or archiving?
- Cross compile simple standard C program on Linux for Mac
- How to offload NAPI poll function to workqueue
- python netifaces - How to get currently used network interface
- Unexpected output from function
- mingw-64 conflicting declarations when cross-compiling
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
Related Questions in UNIX
- passing text with \n as one argument in shell
- C std library don't appear to be linked in object file
- How to split a directory into parts without compressing or archiving?
- Momentjs get current GMT unix time
- Timing packets on a traffic server
- man pages for c variable types
- Blocking in pthread_join()
- PWX-00001 Error opening repository "dtlmsg.txt". RCs = 268/150/2
- Unix c program to calculate pi using threads
- How to perform parallel processes for different groups in a folder?
- Set aliases globally for all users
- wmic csproduct get UUID equivalent for Unix and Mac?
- Send alert for 80% threshold comparing two values from Disk partition
- Unix - Tail Utility would open the file or not
- Redirect Outward of unix os commands to html page
Related Questions in FILE-PERMISSIONS
- Folder permissions would changed in cross functions
- Why can't I open/write from a serial port on Android?
- Script to add users to 'user and group' of a folder and give them Read and Write permissions, in Mac
- Copy permissions form source file to file with same name
- "Failed to open stream" while compiling cache for dev environment
- Why can the `ls` command of Ubuntu list the files of a directory with no execution permission set?
- owncloud "you don't have permission to upload or create files here"
- IIS cannot write file if called from remote, only from the server
- Granting permission/ deleting files which need admin permission
- How to control default permission on copy file unix
- Django log file permissions with uwsgi
- Should vendor folder be writable in Laravel?
- magento cron schedule not working, no heartbeat
- What do all those permissions mean?
- Google Drive API for Android open EXISTING FILE
Related Questions in FOLDER-PERMISSIONS
- How to make a folder non-readable in Java?
- How can I prevent a new folder inherit parent folder permissions by default?
- Is it possible for an ASP.NET MVC application to read files from a folder elsewhere on the web server?
- How to set all the permissions recursively to the new folder created on FTP server using PHP?
- windows server 2008, how to make folder writable for my asp.net mvc3 app?
- Write permission to root folder with PHP and IIS (WebsitePanel)
- How can I give user access to folder owned by root without adding user to sudoers file?
- EWS Folder Permission
- Android: Create a new folder and change it's permissions
- SSIS Package completes successfully when ran from Visual Studio SSDT but fails from SQL Agent
- How to upload files to a folder using a specific user group login and password?
- Permissions set on Folder via Powershell for Active Directory Group not working
- Unable to delete the bin directory in Filezilla
- VBScript cannot delete folder "Permission Denied Error"
- SQL connection issue from paticular folder
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It depends on how your system is set up.
If you're lucky, the
admgroup already has read access to those files. If so, then simply add your user to theadmgroup:The
admgroup is commonly used to provide read access to system log files, without having to give the user super powers. Your user will also be able to read anything elseadmgroup has access to.If those files have no group access at all, (ie they show
-rw-------and are owned by root/root), then the next best option is to usesetfaclto give your user read access to those files:Be aware that once logrotate shuffles those files, your user may not have access to the new log file. You might have to set up your
setfaclcommands in a cron job to keep access going.It is also possible to expand permissions on that folder, but persisting that change involves modifying the /etc/logrotate.d/apache2 file. Since your package manager likely created /etc/logrotate.d/apache2 (and will probably want to modify it at some point) I don't recommend going that route.