I access my Google Drive via the terminal using gdfuse. There is a directory that exists, but I can't seem to access via the terminal:
I have a directory called 'papers'. Within that I want to access 'instructions'. When I do ls -ltr I see:
?????????? ? ? ? ? ? instructions
drwxrwxr-x 2 user user 4096 Jun 12 2017 my_docs
-rw-rw-r-- 1 user user 3923 Jul 25 2017 bs237-procedure.txt
with the word instructions appearing in red. And if I try to cd instructions I am told bash: cd: instructions: No such file or directory.
However if I use a browser to go into my Google Drive, I can access the directory 'instructions' and the files within it no problem.
I was searching and I reached this answer, hope it works for you!
To read a file, its read permission needs to be set. However, to read a directory and the listing of its files, both the read and the execute permissions need to be set. If they aren't, you get weird errors like the ones you're experiencing.
To set the read permission on files and the read and execute permissions on directories recursively, use this command:
chmod -R a+rX directoryname
and link to that page: https://askubuntu.com/questions/243999/why-do-question-mark-characters-appear-when-changing-the-permissions-of-director
edit : you can change the folder name, again I saw this on the internet and it seems to work!
Related
Whenever I start my iterm terminal. I always get this message followed by prompt on my terminal.
Last login: Fri May 1 21:33:59 on ttys001
[oh-my-zsh] plugin 'zsh-syntax-highlighting' not found
[oh-my-zsh] plugin 'zsh-autosuggestions' not found
[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x 7 david admin 224 Apr 30 22:22 /usr/local/share/zsh
drwxrwxr-x 6 david admin 192 Apr 30 23:30 /usr/local/share/zsh/site-functions
[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.
[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w
[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.
~
➜
What can I do so that it doesn't show all these above [oh-my-zsh] messages and I can go to direct prompt? Is there anything wrong I did while setting up [oh-my-zsh]?
It looks like you're trying to use plugins that are not installed. See the following documentation on how to install them:
zsh-syntax-highlighting
zsh-autosuggestions
(basically you want to clone the repos into $ZSH_CUSTOM/plugins and source them in your .zshrc, but see the documentation of each for actual commands to use. NOTE: zsh-syntax-highlighting must be the last plugin sourced.)
The other part of your question is answered in your terminal output:
To fix your permissions you can do so by disabling the write permission of "group" and "others" and making sure that the owner of these directories is either root or your current user.
It looks like the owner is already your current user, however your permissions are rwxrwxr-x, which are read, write, execute for users and group, and read, execute for others. From the warning message you should remove the write permission from group:
sudo chmod 755 zsh
now when you ls -l you should see rwxr-xr-x for that directory.
Do the same for the /usr/local/share/zsh/site-functions directory.
The warning message even gives you an alternative, suggesting you place the following in your ~/.zshrc file and restart zsh:
ZSH_DISABLE_COMPFIX="true"
Suggesting you place the following in your ~/.zshrc file and restart zsh:
ZSH_DISABLE_COMPFIX="true"
Put this on the top .zshrc file. It works for me.
ZSH_DISABLE_COMPFIX="true"
I'm trying to get the symbolic link from other user.
My file is located in /home/serviceA/logs/a.txt And I want to create a symbolic link to /home/centos/logs/a.txt.
Here is my command I ran as root user:
ln -s /home/serviceA/logs/a.txt /home/centos/logs/a.txt
I see the red color of filename. And I still get the permission denied error
The error is lrwxrwxrwx 1 root root 47 Feb 12 01:49 /home/centos/logs/a.txt -> /home/serviceA/logs/a.txt
Eventually, I want to forward the /home/centos/logs/a.txt log file to the Splunk.
Why am I getting the permission error after creating the symbolic link? And how do I fix it? (chmod 777 didn't help)
Unfortunately, that isn't how symlinks work on Linux systems. You can't create a symlink to a file, then change the permissions on the symlink and have it change the permissions of the actual file. Think of the security issues with this approach!
If you want Splunk to be able to monitor /home/serviceA/logs/a.txt, you will need to either:
change the file to be world readable (chmod a+r /home/serviceA/logs/a.txt), OR
add splunk (assuming Splunk is running as user splunk) to the group that owns the file, and make the file group readable (chmod g+r /home/serviceA/logs/a.txt), OR
run Splunk as root, BUT THIS IS VERY BAD, DO NOT DO THIS IN PRODUCTION, ONLY DO THIS FOR TESTING, AND EVEN THEN, ITS VERY BAD
We have a oracle 12.1.0.2 installation on Linux, we have a procedure that read files from a folder, process data and writes file to another folder, and we have all permission required on the folder, so it works up to this point.
The problem arise when we try to remove the source file from the starting folder, because the database user has all the the rights on the folder but not on the specific file! Users and suppliers can upload file in this folder via ftp and we couldn't find way to replicate folder permission, I attach a couple of screenshots, please help.
Oracle error is ORA-29283: Invalid file operation
Folder Rights
File Rights
During creation of the files, the permission -rwxr-xr-x might be granted by issuing :
$ chmod 755 test_ftp.xlsx or $ chmod a+x test_ftp.xlsx for related file to be able to be deleted.
(null).1001.1001
What is this folder? Where does it come from?
drwxrwxrwx 49 appusr appusr 4096 Jan 7 21:52 (null).1001.1001
I think it has something to do with Mr. Root impersonating Mr. AppUsr in a background task, but I posted to AskUbuntu last week, and nobody there recognized it.
Why am I asking? Well ...
On an Ubuntu box, I have a restricted-access applications user who is uid 1001 and gid 1001. Root launches Rserve under that user during boot. The Rserve session is writing into a Windows CIFS share. All seems to be functioning as intended ...
I'm finding these folders peppered throughout the application user's file tree:
drwxrwxrwx 49 appusr appusr 4096 Jan 7 21:52 (null).1001.1001
I'm finding these subfolders in various folders. Each of these subfolders is different, but they seem to contain partial temporary files, like stuff that I extracted from a tarball, or partial pdf writes.
My primary interest in these folders is that I've found that sometimes I need them and don't have them. There's a particular operation can work or fail depending on whether or not this folder is present. When writing a PDF from inside a knitr document that I call remotely from Rserve, I get this error message
## Error in plot.new(): cannot open file '', reason No such file or directory
I can't find an R reason for this, and it works when called from an rstudio-server session or from a Windows Rstudio IDE, but when called from Rserve, it seems to depend on having that folder present in the filesystem, and I'm quite sure that I didn't put it there! What is it?
I'm trying to change the permissions of a few files that are used with a webpage I'm uploading to my site. I'm using the Unix command line to do it.
I've tried two commands:
chmod 755 index.html
chmod 644 index.html
But I get the message
chmod: WARNING: can't access index.html
after using these commands for some reason, and I have no idea why... initially I though it might be because I had the file open in a couple of programs (text editor and web browser), but I've closed these down, and I'm still getting the same problem... any idea why, and how I can set the permissions correctly so that the file will be viewable by anyone on the web, but only editable by me?
Cheers!
Here's a link that looks similar to your problem but it's on Solaris:
http://www.unix.com/solaris/45229-unable-chmod-file-directory.html
The solution is on pg 2 of this thread but the Cliff's note version of the solution is the person found that something else was mounting at that directory. It showed up when they ran
df -k /their_dir_location
Hope this helps.
another possible issue is ... if you are using solaris zones .. the directory visiable in more than one zone but only one zone has write abilities.