Changing Ownership Of USB 'Not Permitted' Why?

gael33@gael33-Aspire-X3950 ~ $ sudo chown $USER:$USER /media/usb1
[sudo] password for gael33:
gael33@gael33-Aspire-X3950 ~ $ sudo chown $USER:$USER /media/usb1
chown: changing ownership of ‘/media/usb1’: Operation not permitted
gael33@gael33-Aspire-X3950 ~ $

Any idea why I cannot change permissions on my USB drive?
Any help would be appreciated.

Thanks

gael


Similar Content



Chown Question For Subdirectories

I have a directory structure and files I wish to change permissions on, but I don't want to change permissions on every file/subfolder along the way. Example: I want to chown all files in dir4 where my directory struture is:
/dir1/dir2/dir3/dir4/*
However, both dir3 and dir4 are owned by root:root so I need to change the ownership on those directories as well. But, if I do:
chown -R user:group /dir1/dir2/dir3/dir4/
...it will indeed make dir4 and it's files accessible, but it doesn't change dir3 - so folks still can't get to the files they need. I thought about doing:
chown -R user:group /dir1/dir2/dir3*
... but that will give users access not only to dir4 and it's files, but any other files under dir3 which I don't want.

My work around has been to do a chown on /dir1/dir2/dir3 and then a second chown on /dir1/dir2/dir3/dir4/, but I am thinking there has to be a way to do what I want in a single chown command - right?

Write Permissions To External Drive

I have an external disk but I can only write to it using sudo, not as my normal user.

The commands I've issued a
Code:
sudo mkdir /media/USBSSD
sudo mount -t auto /dev/sda1 /media/USBSSD
sudo chmod 777 /media/USBSSD
sudo mkdir /media/USBSSD/share

How can I set it up so that other users can write to it?

What Is The Rsync Flag To Ignore Permissions

I am using Rsync to backup files to a another machine, the users on my fileserver do not exist on the backup server so Rsync throws errors about the permissions. It copies the files fine but I want to get rid of the errors and have Rsync ignore the permissions when backing up.

/backup is a mounted ftp directory

Below is the current command and output:
Code:
root@Fileserver:~# rsync -av --delete /shared/fileshare/ /backup/backup
building file list ... done
created directory /backup/backup
./
manager/
manager/chironfs.txt
manager/cronman.txt
manager/curlftpfs.txt
manager/curlman.txt
manager/getnetaddress.txt
manager/grepman.txt
manager/rsyncman.txt
manager/tarman.txt
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/
rsync: chown "/backup/backup/manager/.chironfs.txt.c6MbJ7" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.hdBG4P" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.curlftpfs.txt.t1sG4L" failed: Operation no                 t permitted (1)
rsync: chown "/backup/backup/manager/.curlman.txt.6oWPoW" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.getnetaddress.txt.V8z8Kk" failed: Operatio                 n not permitted (1)
rsync: chown "/backup/backup/manager/.grepman.txt.REh4WW" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.rsyncman.txt.ho8VNM" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.tarman.txt.BkcmeS" failed: Operation not p                 ermitted (1)

sent 211115 bytes  received 274 bytes  6710.76 bytes/sec
total size is 210263  speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sende                 r=2.6.9]
root@Fileserver:~#

I tried the flag to adding the no flag to -p but it still didn't work, see below:
Code:
root@Fileserver:~# rsync -av --no-p --delete /shared/fileshare/ /backup/backup
building file list ... done
./
manager/
manager/chironfs.txt
manager/cronman.txt
manager/curlftpfs.txt
manager/curlman.txt
manager/getnetaddress.txt
manager/grepman.txt
manager/rsyncman.txt
manager/tarman.txt
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/
rsync: chown "/backup/backup/manager/.chironfs.txt.6Q3eP2" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.FC8Orx" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.curlftpfs.txt.mlVSN9" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.curlman.txt.vlJ4b1" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.getnetaddress.txt.LXmft0" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.grepman.txt.SVuaye" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.rsyncman.txt.KTNYqA" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.tarman.txt.zcU90c" failed: Operation not permitted (1)

sent 211115 bytes  received 274 bytes  7686.87 bytes/sec
total size is 210263  speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]

Assign Group Permission To Newly Created Files

Directory /media/data/torrents/ has permissions 775, user yzt, group transmission

yzt and debian-transmission are members of the group transmission.

transmission-daemon is run by debian-transmission, and the new files it downloads have permissions 644, owner debian-transmission, group transmission. This is a problem, because I can't later move the files as my user, yzt, and need to be switching to root to change the permissions/ownership to be able to do so.

Using sticky bit I could copy it to anywhere else, but I'm interested on actually moving the file, not just copying it. I could run transmission-daemon as yzt and problem solved, but I rather have that internet facing service running by a limited user, just in case some vulnerability is found on Transmission.

So my question is, how can I set that every new file created under /media/data/torrents/ has permissions 775 like its parent directory?

Why Vsftp Can Do It, But Openssh Sftp Cannot ? (chroot)

Dear all,

This is long story cut short, with vsftp, if i set this parameters in the vsftp.conf file below

Code:
local_enable=YES
chroot_local_users=YES

I am able to login to the ftp account, see and list my home/user directory, and if i do a cd / or cd .. , i will still be chroot to my /home/user directory.

without, the need to chmod or or chown anything to my /home/user directory

=============================================

With openSSH, internal_sftp, even though I have set the sshd_conf to

Code:
Match user alankoh
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
ChrootDirectory /home/%u

I will need to change owner my /home/user directory to have root becomes it owner.
============================================

Q1) why this difference ? How does vsftp chroot without changing the /home/user folder ownership ?

Q2) i realize that openssh ChrootDirectory parameter causes my default login directory to be set as that of the parameter.
(e.g. if i set to "/whatever/xyz", i will be brought to that /whatever/xyz everytime i login to the sftp instead of my /home/user folder.

Why ? I thought that ChrootDirectory is just a security measure to specify the directory to go to in case the user cd to root (e.g. cd /), else not, i should still go to my /home/user folder everytime i login to sftp.

Regards,
Noob

Impossible To Get Kubuntu Open On ChromeOS

Hi everyone,

I am currently a user of crouton under chromeOS. It worked "pretty" well for about two months but does not work anymore. When I open it, linux start normally but suddenly stop and give me this message:

Quote:
The following installation problem was detected
while trying to start KDE:

No write access to $HOME directory (/home/paul).

KDE is unable to start.
I already try this Code:
sudo chown -R group:user /home/user

But I can not remember group and user name.

Thanks a lot

Lsof -i Issue

Hello,

I would like to use the lsof -i command without a privilege elevated user, however it doesn't work, the output is null. It does only work when I sudo it. On another server, I've got it working perfectly, without the user being root or having to use sudo (web user). How would I be able to proceed ?
Linux - Ubuntu 14.04.

Thanks.

Sudo: No Valid Sudoers Sources Found, Quitting

Hello,

I am getting the follwoing error for Red Hat Enterprise Linux Server release 6.6

sudo su -
sudo: >>> /etc/sudoers: syntax error near line 118 <<<
sudo: parse error in /etc/sudoers near line 118
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

cd /etc/sudoers.d/
-bash: cd: /etc/sudoers.d/: Permission denied

Could you help me to figure it out. As a root user am able to access but as normal user it is not allowing to sudo su - command.

vi /etc/sudoers.d/access
username ALL=(ALL) NOPASSWD: ALL

Please let me know if any additional formation required.

Become A Root Wiht Public Key Access

Hello Everyone,

I have a question about how to give sudo privileges to a user that log in via public key without password.

I created a normal user and I added this user to the "visudo" folder with ALL privileges.

when the user is logged in the system via public key and the user wants to become a root, a password is requested but i don't want to type the password.

Also to add the public key to the root it is not possible because i track the user log in in the system and if they log via root i cannot do that.

Thank you in advance.

Changing Password To A User

Hi
When i tried to change the password for a particular user as a root by using usermod command I didn't see any error at that time.But later when I tried to login again it is not accepting the new password as well as old password.Why its happening?Any help....