LinuxQuestions.org
Visit Jeremy's Blog.
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-2021, 12:08 PM   #1
sam_nyc
Member
 
Registered: Aug 2009
Posts: 73

Rep: Reputation: 1
Linux permission issue, can you explain this...


I am having weird permission issues. can you someone help me.

Code:
[root@web2 PU3120421]# ls -la
total 3208
drwxrwsrwx     6 xxweb  bh_lab    170 Mar 31 10:44 .
drwxrwsrwx 10184 user1pet bh_lab 274914 Mar 31 10:46 ..
drwxrwsrwx     2 xxweb  bh_lab    182 Mar 31 10:49 models
drwxrwsrwx     2 xxweb  bh_lab      0 Mar 31 10:19 partner
drwxrwsrwx     2 xxweb  bh_lab      0 Mar 31 10:19 partner_models


-bash-4.2$ touch 123
touch: setting times of ‘123’: Permission denied


-bash-4.2$ ls -lt
total 312
----rwx--- 1 honigwb bh_lab     0 Apr  1  2021 123
----rwx--- 1 honigwb bh_lab     0 Mar 31 10:49 xyz
-rwxrwx--- 1 xxweb   bh_lab 62980 Mar 31 10:44 1f51_E.1_E.pdb
----rwx--- 1 honigwb bh_lab     0 Mar 31 10:41 1f51_E.1_E.pdb~
----rwx--- 1 honigwb bh_lab     0 Mar 31 10:41 4913
I typed touch 123 and I get error message permission denied but it creates the file as you can see above... but it comes as 070

not sure why?
 
Old 04-01-2021, 12:26 PM   #2
RickDeckard
Member
 
Registered: Jan 2014
Location: Canton, Georgia, USA
Distribution: Debian 12
Posts: 205

Rep: Reputation: Disabled
Can you check your default umask for me? Go to the terminal, type "umask" and let us know what it says
 
Old 04-01-2021, 12:45 PM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
that is written: file is successfully created, but failed to set time - because of the permissions.
Need to know umask settings and also access rights on that dir and current user (at least)
 
Old 04-01-2021, 01:02 PM   #4
sam_nyc
Member
 
Registered: Aug 2009
Posts: 73

Original Poster
Rep: Reputation: 1
Thanks for the quick reply RickDeckard and Pan64.

Quote:
-bash-4.2$ umask
0022
 
Old 04-01-2021, 02:30 PM   #5
tramsch
Member
 
Registered: May 2014
Distribution: Gentoo, RHEL, Mint
Posts: 35

Rep: Reputation: 6
Hi sam_nyc,

in your output you sued to a user and changed dir.

Please give us the following after switching to the user and dir (pan64 actually asked already :-) )
Code:
whoami
pwd
ls -ld .
 
Old 04-01-2021, 03:56 PM   #6
sam_nyc
Member
 
Registered: Aug 2009
Posts: 73

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by tramsch View Post
Hi sam_nyc,

in your output you sued to a user and changed dir.

Please give us the following after switching to the user and dir (pan64 actually asked already :-) )
Code:
whoami
pwd
ls -ld .
[root@web2 models]# whoami
root
[root@web2 models]# pwd
/ifs/data/c2b2/bh_lab/shares/hfpd/web/PredUs_new/www/data/job_data/PU3120421/models
[root@web2 models]# ls -ld .
drwxrwsrwx 2 bhweb bh_lab 203 Apr 1 12:59 .
[root@web2 models]# umask
0022
 
Old 04-02-2021, 02:42 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you missed some steps. What you posted was generated with root account, but we need that info using the same account (when you executed that touch).
 
Old 04-02-2021, 03:40 PM   #8
sam_nyc
Member
 
Registered: Aug 2009
Posts: 73

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by pan64 View Post
you missed some steps. What you posted was generated with root account, but we need that info using the same account (when you executed that touch).
Code:
-bash-4.2$ umask
0022
-bash-4.2$ whoami
honigwb
-bash-4.2$ cd /ifs/data/c2b2/bh_lab/shares/hfpd/web/PredUs_new/www/data/job_data/PU3120421/models
-bash-4.2$ ls -ld .
drwxrwsrwx 2 bhweb bh_lab 203 Apr  1 12:59 .
 
Old 04-02-2021, 07:10 PM   #9
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
NFS? Show us

df .

Or cifs? Try: strace (touch ...)

Apr 1 2021 123
Indicates (maybe like): your time is a drastic mismatch to the file server's time!

Last edited by !!!; 04-02-2021 at 07:22 PM.
 
1 members found this post helpful.
Old 04-03-2021, 12:53 PM   #10
tramsch
Member
 
Registered: May 2014
Distribution: Gentoo, RHEL, Mint
Posts: 35

Rep: Reputation: 6
I am still a little bit puzzled :-)

Could you please give additionally, while in the models dir
Code:
df -h .
mount
id honigwb
?
 
Old 04-05-2021, 04:07 AM   #11
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
You haven't yet showed the group of honigwb, so I also look forward to the output of id.
Do you have SELinux enabled or access control lists?
If so than you also need to look at what restrictions they enforce on the current file.
 
Old 04-05-2021, 11:58 AM   #12
sam_nyc
Member
 
Registered: Aug 2009
Posts: 73

Original Poster
Rep: Reputation: 1
Hi,

Please help.


Quote:
-bash-4.2$ umask
0022

-bash-4.2$ id
uid=2152(honigwb) gid=5996(bh_lab) groups=5996(bh_lab),6082(service_acct),6114(bh_webgrp)

-bash-4.2$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 185M 1.7G 10% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root 17G 6.0G 12G 35% /
/dev/xvda1 1014M 227M 788M 23% /boot
tmpfs 378M 0 378M 0% /run/user/0
isilon.hpc:/ifs/home 2.6P 847T 1.7P 34% /ifs/home
isilon.hpc:/ifs/scratch 555T 368T 188T 67% /ifs/scratch
isilon.hpc:/ifs/data 125T 56T 70T 45% /ifs/data
10.116.211.102:/sysops 5.1T 4.0T 1.1T 79% /q/sysops
webfs.hpc:/data/www 1.5T 773G 629G 56% /ifs/www
tmpfs 378M 0 378M 0% /run/user/3637
tmpfs 378M 0 378M 0% /run/user/3537

-bash-4.2$ id honigwb
uid=2152(honigwb) gid=5996(bh_lab) groups=5996(bh_lab),6082(service_acct),6114(bh_webgrp)

-bash-4.2$ pwd
/ifs/data/c2b2/bh_lab/honigwb
-bash-4.2$ cd /ifs/data/c2b2/bh_lab/shares/hfpd/web/PredUs_new/www/data/job_data/PU3120421/models

-bash-4.2$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
isilon.hpc:/ifs/data 15032385536 13717506048 1314879488 92% /ifs/data

-bash-4.2$ sestatus
SELinux status: disabled

-bash-4.2$ date
Mon Apr 5 12:57:15 EDT 2021
-bash-4.2$

Last edited by sam_nyc; 04-05-2021 at 11:59 AM.
 
Old 04-05-2021, 12:22 PM   #13
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
See 7.4. I do not have permission to access files on the mounted volume in Linux NFS-HOWTO.
 
Old 04-06-2021, 01:08 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
yes, I can only repeat:
umask looks ok, you are on the filesystem: isilon.hpc:/ifs/data.
We know your user id and dir, but we still don't know how is this filesystem mounted (and we also don't know the settings of the original filesystem/OS).
The file you touch-ed was successfully created, but the owner (honigwb) has no any right on it, therefore time cannot be set.
(is this your homework or exam?)
 
Old 04-06-2021, 05:19 PM   #15
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Edit: I might be wrong, based on post #14 above ownership reason.
https://unix.stackexchange.com/quest...-writable-file
https://support.oracle.com/knowledge...1575824_1.html
(But I forgot my Oracle account, so I can't see it)
HW?: https://m.youtube.com/watch?v=tcVL53c5d04
Excuse my word salad.


Try the same (permission restrictions) on a local file system, to see if your scenario behaves the same.

mount | grep ifs/data
(Also on file server isilon.hpc)
Maybe also check the NUMERIC uids on both machines. (/etc/passwd)



Carefully COMPARE and show us the (true maybe meaning UTC) date
on both this machine and the file server isilon.hpc

Note my comment about how `ls` only reports the date and not the time IF the inode time is in the future!

stat give lots of details about an inode

I'm suspecting the time on the file server, where the inode actually lives, is in the future, relative to this machine. You can do some web research about this condition with NFS

Last edited by !!!; 04-07-2021 at 08:49 AM.
 
  


Reply

Tags
nfs



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
Can you explain NAS/SAN for Enterprise Linux to me? shfyang Linux - Networking 1 10-25-2013 02:58 AM
Explain Linux folder permission AGazzaz Linux - Newbie 15 10-27-2009 08:53 PM
Can you explain why OpenSSH would corrupt my Active Directory domain? HGeneAnthony Linux - General 0 08-13-2005 10:24 PM
Which distro do you prefer and why? Can you explain it clear enough? kornerr Linux - General 1 06-11-2005 10:41 AM
Can you explain the difference between "Free Software (GNU)" and "Open Source"? vharishankar General 5 03-03-2005 09:40 AM

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

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