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 answers
Related Questions in LINUX
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- Writes in io_uring do not advance the file offset
- Why `set -o pipefail` gives different output even though the pipe is not failing
- what really controls the permissions: UID or eUID?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Docker container unable to make HTTPS requests to external API
- Whow to use callback_query_handler in Python 3.10
- Create kea runtime directory at startup in Yocto image
- Problem on CPU scheduling algorithms in OS
- How to copy files into the singularity sandbox?
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
Related Questions in UNIX
- Reading & Writing to the same file from terminal
- `df` command not capturing entire output in perl
- Why is it that when I pass certain directory names to `ls`, sometimes it does not list their contents?
- Detect Mouse Clicks; Terminate Program on Scroll Wheel Movement
- grep expression behaving weird (unix/mac) while reading a conf file
- Unix sub path creation and copy files
- Ignoring folders in The Silver Searcher `ag`
- struct nameidata-Linux Kernel Module
- telegraf service not able to retrieve data using the journalctl commands
- Order of options in Unix sed for editing files in-place
- Trying to echo line variable along with another variable inside a while read loop
- failed to handshake with xxx: authentication error?
- UDP socket client not able to receive data
- Invalid SCA token in unix
- How can I keep randomized UNIX timestamp in specific hour range in SQL?
Related Questions in FILE-PERMISSIONS
- Change file permsission on Android app programmatically
- Connecting to SQL Server and performing BULK INSERT from Linux Container
- File says permission denied, despite the fact that I have run 'chmod 777' on the file
- elasticsearch cannot read certificate file
- Simple and basic python csv file opening
- How to choose Dev devices Permissions
- Set permissions to "DENY" file and folder deletion in Windows 2016 Server
- Compressing a Picture in flutter returns null
- SOLVED -- Saving an image from Photo Picker in app folder for permanent access
- Cannot display a file in an expo react-native mobile app project using react-native-webview dependency's WebView component
- How can I get permission to save file for flet app on android?
- Making file manager app in Android Studio and can't write to storage
- Windows service not able to delete a file
- how to create SharePoint document-level permissions by copying the permissions at a file level to a field in the index?
- How to Change the UNIX File Ownership and Permission for a File Copied to the Azure Blob Container?
Related Questions in FOLDER-PERMISSIONS
- How to create a folder on Windows machine which can only be accessed by application?
- Security and Permissions Requirements for VS Code
- How to upload files to a folder using a specific user group login and password?
- Why moodle saying Unable to save the cache config to file
- Powershell Script to add Administrators with full permissions adds Admin group with NO permissions
- SSIS Package completes successfully when ran from Visual Studio SSDT but fails from SQL Agent
- Folders created by Program causes read-only to appear
- ASP.NET identity impersonate failing domain admin
- Powershell Get-Acl for folders without access permissions
- What user or group does Windows consider Sublime Text to be?
- Change the Windows folder permissions to Read only from Python
- applying all the missing permissions from folder source to folder target in powershell
- Unable to write the file in a folder hosted as a Azure Web App
- How to save image in a subdirectory using file_put_contents and return the path in php
- After RoboFramework finishes the test execution sets the output folder to read-only
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?
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)
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.