Unknown users rights (-????????? ? ? ? ? ? myFile.php) [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have some weirds user rights on my files.
Log as user1, I have set user2 owner of the files. It did worked.
-rw-r-xr-x 1 user2 user2 21090 Jun 18 16:28 myFile.php
drw-r-xr-x 2 user2 user2 4096 Jun 18 16:30 font
But then, when I log with user2 I Have this weirds unknown rights.
-????????? ? ? ? ? ? myFile.php
d????????? ? ? ? ? ? font/

Top directory that contains these files has no "x" bit set.
chmod u=rwx test2/; ls -l test2
total 4
drwxr-xr-x 2 user group 4096 Jun 19 14:43 dir
-rw-r--r-- 1 user group 0 Jun 19 14:43 file
chmod u=rw test2/; ls -l test2
ls: cannot access test2/file: Permission denied
ls: cannot access test2/dir: Permission denied
total 0
d????????? ? ? ? ? ? dir
-????????? ? ? ? ? ? file
To fix this, please add "x" bit to following section of root directory. Usually "group" part is relevant but it might be "others" or "user" depending on your situation.
chmod g+x /path/to/directory
For further reading please consult http://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions

Related

Why does one command need sudo but the other one doesn't with the same permissions [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
I have the bzcat command with the following permissions:
-rwxr-xr-x 3 root root 39144 Sep 5 2019 /bin/bzcat
I have the bzmore command with the following permissions:
-rwxr-xr-x 1 root root 1297 Sep 5 2019 /bin/bzmore
And I have a bz2 zip file:
-r-------- 1 root root 61 Feb 17 14:37 flag.bz2
When I use bzmore flag.bz2 it works fine. But when I use bzcat flag.bz2 I get Can't open input file flag.bz2: Permission denied.. Why is this? If I put sudo in front of bzcat it works fine too but why doesn't bzmore need this when they both have the same permissions.
I tried running all the commands to test out what happened.

Could not acces to home directory /home/user01: Permission denied [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I created a new username called user01. Then, I used usermod to grant permissions with another user.
After that, I logged out and login as user 02 but can access to /home/user01
[user02#SRV01 ~]$ cd /home/user01/
-bash: cd: /home/user01/: Permission denied
I checked the directory and permisions of /home/user01 and user by this commands:
[user02#SRV01 ~]$ ls -ltrh / | grep home
drwxr-xr-x. 10 root root 4,0K feb 19 2019 home
[user02#SRV01 ~]$ ls -ltrh /home | grep user01
drwxrwxr-x+ 17 user01 user01 4,0K nov 26 18:14 user01
root#SRV01 /home # id user02
uid=509(user02) gid=500(user01) grupos=500(user01),511(user02)
What's the exactly problem? Thank's in advance
The plus sign at the end in the listing of user01 directory implies the use of ACL. (Access Control Lists)
For more information on the permissions, use getfacl command.
That should show that the user02 has read-execute access on the directory user01.
If the appropriate setting is not there, you'll need to do that using setfacl.
For example,
setfacl -m u:user02:x user01
setfacl -m u:user02:r user01
I hope this works!
You can play around with them after reading more on man page of the getfacl/setfacl commands.

Ubuntu 12.04 add existing user to group [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have problem with Ubuntu.
I'm trying add user tbalicek to group www-data but the following commands doesn't work.
tbalicek#UBK-LINUX:/var/www$ sudo usermod -a -G www-data tbalicek
tbalicek#UBK-LINUX:/var/www$ groups
tbalicek sudo
tbalicek#UBK-LINUX:/var/www$ groups tbalicek
tbalicek : tbalicek www-data
I don't understand why groups and groups tbalicek return different results?? When I'm loged like tbalicek
When I'm trying mkdir like tbalicek in folder where si own group www-data I get: permission denied
tbalicek#UBK-LINUX:/var/www$ ls -ltr
total 20
-rwxrwxr-x 1 www-data www-data 31 Mar 27 13:52 index.php
drwxrwxr-x 9 www-data www-data 4096 Mar 27 17:16 pelnar
drwxrwxr-x 16 www-data www-data 4096 Mar 27 17:21 redmine
drwxrwxr-x 9 www-data www-data 4096 Apr 3 17:54 taskagent
-rwxrwxr-x 1 root root 22 Apr 10 14:35 info.php
tbalicek#UBK-LINUX:/var/www$
Group assignments don't take effect in the current shell. You have to log out and log back in to see the group changes.
From the Debian Wiki for sudo:
After being added to a new group the user must log out and then log back in again for the new group to take effect. Groups are only assigned to users at login time. A most common source of confusion is that people add themselves to a new group but then do not log out and back in again and then have problems because the group is not assigned.
You might get a better response for this sort of question on ServerFault.
Try the newgrp command:
ts#cmp:~$ id
uid=1001(ts) gid=1001(ts) groups=1001(ts),27(sudo)
ts#cmp:~$ newgrp www-data
ts#cmp:~$ id
uid=1001(ts) gid=33(www-data) groups=1001(ts),27(sudo),33(www-data)
Just a nitpick, 'sudo adduser user group' will also add a user to a group and I find the syntax easier to remember than using usermod.

unable to change the permisson of an file in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Unable to change the permission of the cgi-bin. I want that folder to have write option for user too
abc#abc:~/public_html> ls -l
total 12
drwxr-xr-x 2 root root 4096 2013-10-24 11:16 cgi-bin
-rw-r--r-- 1 john users 835 2013-10-24 15:54 index.html
when i write
abc#abc:~/public_html> chmod 770 cgi-bin
error:
chmod: changing permissions of `cgi-bin': Operation not permitted
you should use
sudo chmod 770 cgi-bin
or to recursively change all files in the folder
sudo chmod -R 770 cgi-bin
You can also use this
$ sudo chmod -R 777 dirpath/filename

Chown not working [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
On Ubuntu 12.04, the chown command doesn't seem to be working like it should
root#server:/var/www/folder/# ls -al
Running this puts out
drwxr-xr-x 11 776 sftponly 4096 Feb 17 14:08 Other_Folder
I need write permissions for the group, so I run:
chown -R 776 ./Other_Folder
Then when I run ls -al again, the output is still
drwxr-xr-x 11 776 sftponly 4096 Feb 17 14:08 Other_Folder
chown is used to change ownership of the file, not change permissions.
ls -al is not showing you who owns the file, just its permissions.
If root owns those files, you'll need to chown them properly, before you can change their permissions:
chown -R yourname:yourname folderName
Then as the owner you can change their permissions:
chmod -R 776 folderName
Edit:
I double checked the syntax and it seems to be right, you'll likely need to use sudo to use them.

Resources