LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to modify permissions (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-modify-permissions-937705/)

OasisTech 04-02-2012 11:55 AM

Unable to modify permissions
 
I'm running a Ubuntu server version 11.10 and I've added a secondary hard drive recently.

Using Nautilus, I can create and edit files/folders but I'm unable to modify permissions. Currently, the drive is labeled "FC503CC8503C8C00" with the following permissions

drwxr-xr-x 6 root root 4096 2012-03-31 09:40 .
drwxr-xr-x 22 root root 4096 2012-03-27 08:09 ..
drwxr-xr-x 2 root root 4096 2012-01-20 22:50 cdrom
drwx------ 6 root root 4096 2012-03-22 15:25 FC503CC8503C8C00
drwx------ 1 user1 user1 4096 2012-03-30 17:46 FC503CC8503C8C00_
lrwxrwxrwx 1 root root 7 2012-01-20 22:47 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2012-01-20 22:47 floppy0

When I attempt to modify the permissions, I receive the following:

chmod 777 /FC503CC8503C8C00_
chmod: cannot access `/FC503CC8503C8C00_': No such file or directory

Altimately,I'm trying to share the folders to other machines within the network.

Any suggestions?

Thanks,

suicidaleggroll 04-02-2012 12:14 PM

Where is FC503CC8503C8C00 mounted? Your ls -l makes it look like it's in the /mnt/ directory or similar, yet you're trying to chmod it like it's in /. Your chmod should look like
Code:

chmod 777 /mnt/FC503CC8503C8C00_
Assuming that's where it lives.

Sydney 04-02-2012 12:18 PM

Quote:

Originally Posted by suicidaleggroll (Post 4642778)
Where is FC503CC8503C8C00 mounted? Your ls -l makes it look like it's in the /mnt/ directory or similar, yet you're trying to chmod it like it's in /. Your chmod should look like
Code:

chmod 777 /mnt/FC503CC8503C8C00_
Assuming that's where it lives.

Code:

ls -lrt -d -1 $PWD/{*,.*}
should give us the full paths that are needed for your issue.

OasisTech 04-02-2012 12:33 PM

The drive is mounted at /media/FC503CC8503C8C00_. Here are the permissions before any adjustments.

User1@mserver:~$ ls -al /media
total 24
drwxr-xr-x 6 root root 4096 2012-03-31 09:40 .
drwxr-xr-x 22 root root 4096 2012-03-27 08:09 ..
drwxr-xr-x 2 root root 4096 2012-01-20 22:50 cdrom
drwx------ 6 root root 4096 2012-03-22 15:25 FC503CC8503C8C00
drwx------ 1 user1 user1 4096 2012-03-30 17:46 FC503CC8503C8C00_
lrwxrwxrwx 1 root root 7 2012-01-20 22:47 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2012-01-20 22:47 floppy0

After attempting to change command, here are the current permission:

user1@mserver:/media/FC503CC8503C8C00_$ chmod 777 /media/FC503CC8503C8C00_
user1@mserver:/media/FC503CC8503C8C00_$ ls -al /media
total 24
drwxr-xr-x 6 root root 4096 2012-03-31 09:40 .
drwxr-xr-x 22 root root 4096 2012-03-27 08:09 ..
drwxr-xr-x 2 root root 4096 2012-01-20 22:50 cdrom
drwx------ 6 root root 4096 2012-03-22 15:25 FC503CC8503C8C00
drwx------ 1 user1 user1 4096 2012-03-30 17:46 FC503CC8503C8C00_
lrwxrwxrwx 1 root root 7 2012-01-20 22:47 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2012-01-20 22:47 floppy0

No change applied!! Help! I just don't understand.

Thanks

OasisTech 04-02-2012 12:41 PM

Command issued:

user1@mserver:/media/FC503CC8503C8C00_$ ls -lrt -d -1 $PWD/{*,.*}

drwx------ 1 user1 user1 4096 2012-01-24 15:27 /media/FC503CC8503C8C00_/Media
-rw------- 1 user1 user1 671 2012-03-27 17:14 /media/FC503CC8503C8C00_/fstab.txt
drwx------ 1 user1 user1 0 2012-03-30 17:42 /media/FC503CC8503C8C00_/.Trash-1000
drwx------ 1 user1 user1 4096 2012-03-30 17:46 /media/FC503CC8503C8C00_/.
drwxr-xr-x 6 root root 4096 2012-03-31 09:40 /media/FC503CC8503C8C00_/..

Sydney 04-02-2012 12:46 PM

Quote:

Originally Posted by OasisTech (Post 4642803)
Command issued:

user1@mserver:/media/FC503CC8503C8C00_$ ls -lrt -d -1 $PWD/{*,.*}

drwx------ 1 user1 user1 4096 2012-01-24 15:27 /media/FC503CC8503C8C00_/Media
-rw------- 1 user1 user1 671 2012-03-27 17:14 /media/FC503CC8503C8C00_/fstab.txt
drwx------ 1 user1 user1 0 2012-03-30 17:42 /media/FC503CC8503C8C00_/.Trash-1000
drwx------ 1 user1 user1 4096 2012-03-30 17:46 /media/FC503CC8503C8C00_/.
drwxr-xr-x 6 root root 4096 2012-03-31 09:40 /media/FC503CC8503C8C00_/..

So root owns FC503CC8503C8C00_ parent directory and the permissions on it only allow changing by the owner. To effect change on FC503CC8503C8C00_ and not just the files inside root will have work. Do you have sudo or su capabilities on that system? If no you can only change the files inside FC503CC8503C8C00_.

OasisTech 04-02-2012 12:53 PM

Sudo is available on this machine. Do I need to lgoin as Root to modify permission?

Thank you for your assistance.

suicidaleggroll 04-02-2012 12:54 PM

The permissions of the drive itself might also be fixed in the mount command.

Sydney 04-02-2012 12:55 PM

If user1 has sudo rights they should be able to do
Code:

sudo chmod 755 /media/FC503CC8503C8C00_
sorry cant bring myself to type those other two 7s.


All times are GMT -5. The time now is 07:26 AM.