LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2016, 10:42 AM   #1
paperbagperson
LQ Newbie
 
Registered: Mar 2016
Posts: 10

Rep: Reputation: Disabled
Allowing only one file to be viewed in a folder of files


How can I make it so that a certain group can only read (cat/less) one file in a folder of many files? I want to do this without changing file permissions

Last edited by paperbagperson; 04-01-2016 at 10:47 AM.
 
Old 04-01-2016, 10:59 AM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

Why are avoiding just giving that group r-- permission on that file?
 
Old 04-01-2016, 11:43 AM   #3
offgridguy
Senior Member
 
Registered: Nov 2015
Location: Alberta Canada
Distribution: Windows10, Debian
Posts: 1,109

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by paperbagperson View Post
How can I make it so that a certain group can only read (cat/less) one file in a folder of many files? I want to do this without changing file permissions
You could hide the file, although this is not a perfect solution.
http://ccm.net/faq/812-hiding-a-file...ry-under-linux
 
Old 04-01-2016, 12:14 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by paperbagperson View Post
How can I make it so that a certain group can only read (cat/less) one file in a folder of many files? I want to do this without changing file permissions
I read your question as asking...

Quote:
How can I change access permissions on a file without changing access permissions?
I find that a very confusing, circular question with no clear end point (aka answer).

Perhaps a more complete description of what you are trying to do, and the reasons you think that file permissions should not be changed, would help me understand it better.

Also, some context would help, such as distro, use case, etc.
 
Old 04-01-2016, 12:19 PM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192
I'm with astrogeek, as it stands the question makes little to no sense??
 
Old 04-01-2016, 02:03 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
please restate

without changing the permissions you can not change the group or owner

one way very outside the box

encrypt it
and only give the key to the people who you want to read it
 
Old 04-01-2016, 02:18 PM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
I think this question should be formulated like:
How can I make it so that a certain group can only open/access one file in a folder of many files?
Probably you can do that, but they can cat file > /tmp/newfile and open /tmp/newfile, and also there are a lot of other tricks to think about. So as far as I see you cannot restrict users to view several files in the same time.
But probably you can specify your issue better and we can give you a better answer.
 
  


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
[SOLVED] shell script to copy files into folder that matches the file name daveant Linux - Newbie 5 12-07-2011 07:28 AM
how do i md5 hash all files in a sub-folder and save it as a file? steve51184 Linux - Software 2 09-14-2009 06:38 PM
How to check if someone viewed my files? piokon Linux - General 10 07-24-2007 03:47 AM
making a script that will move a file or files in a trash folder Paxmaster Programming 5 12-12-2004 06:00 PM
I have 8 character file name, no extension files being created in my dbaseIII+ folder bonzo Linux - General 2 01-22-2004 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:08 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