Solved

Linux RHEL 5 - Chmod issue

Posted on 2011-09-23
5
512 Views
Last Modified: 2012-05-12
Hi, I am attempting to upload a file into a specific folder using WinSCP..  I need to change a directory to give a specific user upload rights onto the Linux box.

How do I do this from the command line?  Thanks

0
Comment
Question by:NYGiantsFan
5 Comments
 

Author Comment

by:NYGiantsFan
ID: 36587157
When I attempt to change this within WinSCP i get the following error:

Command 'chmod 0770 "tmp"'
failed with return code 1 and error message
chmod: changing permissions of 'tmp': Operation not permitted.
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 250 total points
ID: 36587219
Hi,

chmod can only be run under ROOT or the use of a sudo'er account.

To only give full permission to user and group, use it as follows:

account # sudo chmod 0770 /folder-path
    -    Enter account password
OR
account # su -
   -     Enter root password
root # chmod 0770 /folder-path

Cheers,
Hades666
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 36587333
are you trying to change the /tmp filesystem permissions? I would advise against that. I would crate a subfolder within /tmp then use that.
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36588297
/tmp should be writable by that user, unless you did something unwise with permissions for /tmp.

Have you tried to upload it to /tmp ?  What does WinSCP say when you do?  You say "tmp" and not "/tmp" so I'm not sure where you are trying to run that chmod.

BTW, chmod 0770 isn't going to help unless the user either owns that directory or is in the group for that directory.

Paste command outputs please.
0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 250 total points
ID: 36589344
> chmod: changing permissions of 'tmp': Operation not permitted.
You need to be the owner of "tmp" so you can run "chmod" on it.

You can try to create another directory, say "temp" (so you are the owner of "temp". When this directory created successfully, then do
chmod 0770 temp
  to see if you can do it or not.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question